博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
WPF字体图标——FontAwesom
阅读量:6858 次
发布时间:2019-06-26

本文共 1313 字,大约阅读时间需要 4 分钟。

原文:

版权声明:本文为【CSDN博主:松一160】原创文章,未经允许不得转载。 https://blog.csdn.net/songyi160/article/details/54907492

一、字体图标概述

FontAwesome是迄今为止最出色的图标字体(没有之一),优点是图标多、图标美观、兼容各种应用场景等。

二、获取FontAwesome字体图标库

三、加压下载到的字体库压缩包,得到字体图标库文件

四、像提供的步骤调用即可,只需要将样式引用的字体名称改为:#FontAwesome,注意名称大小写,否则找不到对应的图标

①项目目录结构

②MyFontAwesome.xaml

③App.xaml

④MainWindow.xaml

很奇怪Text属性在网页上无法显示,三个属性分别为:Text=""  Text=""  Text=""

⑤MainWindow.xaml.cs

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;namespace FontAwesomeDemo{    ///     /// MainWindow.xaml 的交互逻辑    ///     public partial class MainWindow : Window    {        public MainWindow()        {            InitializeComponent();            qq.Text = "\xf1d6";            refresh.Text = "\xf021";        }    }}
⑥效果演示

你可能感兴趣的文章
Python Mysql 数据库操作
查看>>
iOS Autolayout 介绍 2 Interface Builder 技巧
查看>>
打卡加虐狗
查看>>
Springboot + swagger2 通过实体对象封装形式上传视频或者图片问题解决
查看>>
Confluence 5 中如何快速创建一个 JIRA Ticket
查看>>
TP5搭建虚拟主机详细步骤
查看>>
高通骁龙 675 发布:首发第四代 Kryo CPU,2019 年 Q1 商用
查看>>
为什么我们做分布式使用Redis?
查看>>
【4opencv】求解向量和轮廓的交点
查看>>
一次邮件发送协议SMTP问题排查
查看>>
Confluence 6 数据库表-系统信息(System information)
查看>>
BugkuCTF 文件上传测试
查看>>
leaflet加载视频图层
查看>>
统治世界的十大算法
查看>>
安装工具
查看>>
关于C#中Partial局部类型关键字的使用
查看>>
Python学习记录(某些特性)
查看>>
【一课专栏】解构ODL引子 - ODL入坑之路·上篇
查看>>
接任马云:创造者张勇和他所改变的阿里巴巴
查看>>
快速上手wepy,制作简易签名板
查看>>