SunnyUI/docs/symbol.md
2024-09-22 21:18:27 +08:00

1.9 KiB
Raw Blame History

字体图标


SunnyUI的字体图标目前主要有两个

  • FontAwesome https://fontawesome.com/
    https://github.com/FortAwesome/Font-Awesome

    enter image description here

  • ElegantIcons.ttf V1.0 https://www.elegantthemes.com/blog/resources/elegant-icon-font enter image description here

    这两个都是目前Web开发常用的字体图标SunnyUI经过精心研发将他们用于.Net Winform开发省去了到处找图标的麻烦。 SunnyUI常用字体图标的控件为UISymbolButton和UISymbolLabel: 输入图片说明

    输入图片说明

    字体图标的选择方法是设置UISymbolButton和UISymbolLabel的以下属性 Symbol字体图标int SymbolSize字体图标的大小int enter image description here

    点击Symbol右侧的按钮 输入图片说明

    鼠标移到图标上显示的数字为Symbol字符点击图标即可设置UISymbolButton的图标。

    .Net6、.Net7Symbol没有右侧的点击按钮
    输入图片说明

    暂时认为是.Net6、.Net7的Winform的问题可参考 https://github.com/dotnet/winforms/issues/6193
    建议将项目的运行环境换成.NetFramework。

    另外SunnyUI还有多处用到了字体图标。 例如: 输入图片说明

    左侧边栏的UINavMenu的图标上侧UINavBar的图标UICombobox的下拉图标UIDatePicker的日期选择图标等等。