wpf 引用ttf

预览字体

引用字体

<UserControl.Resources> 
        <FontFamily x:Key="IconFont">
            Pack://application:,,,/MyApp;component/font/#fontname
        </FontFamily>
    </UserControl.Resources>

使用

如果在viewmodel中或后台代码中使用,直接使用xe692即可(移除开头的&#,换成\,然后将结尾的;移除)

txt.Text = "\xe621";
posted @ 2021-05-27 17:08  Hey,Coder!  阅读(108)  评论(0编辑  收藏  举报