..._wpf fontawesom">
赞
踩
1,通过Nuget添加引用
官网网站:https://github.com/MartinTopfstedt/FontAwesome5
2,窗体命名空间区域追加
xmlns:fa="http://schemas.fontawesome.com/icons/"
3,使用
<fa:FontAwesome Icon="Brands_Adn" Margin="15,0,0,1" FontSize="20" Foreground="#1ABC9C" />
4,窗体代码如下:
- <Window x:Class="FontAwesomeTest.Views.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:fa="http://schemas.fontawesome.com/icons/"
- Title="{Binding Title}" Height="350" Width="525" >
- <Grid>
- <fa:FontAwesome Icon="Brands_Adn" Margin="15,0,0,1" FontSize="20" Foreground="#1ABC9C" />
- </Grid>
- </Window>
5,运行效果
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。