转载:点击打开链接
步骤:
一、下载添加iconfont文件
二、添加到资源文件夹,并设置不复制,且为资源文件
三、增加FIcon.xaml文件
<!--FIcon-->
<Style x:Key="FIcon" TargetType="TextBlock">
<Setter Property="FontFamily" Value="/K.Framework.Controls;component/Resources/#SF2015"></Setter>
<Setter Property="Foreground" Value="{StaticResource TextForeground}"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="20"/>
</Style>