You can go through the link [Font-awesome]
Let's Check how to use [Font-awesome] icon in WPF.
Step-1: Open VS 2017 >> File New Project >> Choose WPF Project
Step-2: Go to Tools >> Package Manager Console
Install-Package FontAwesome.WPF
<Application.Resources>
<FontFamily x:Key="FontAwesome">/Fonts/fontawesome-webfont.ttf#FontAwesome</FontFamily>
</Application.Resources>
<!--register the icon-->
xmlns:fa="clr-namespace:FontAwesome.WPF;assembly=
FontAwesome.WPF"
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0 50 0 0">
<fa:ImageAwesome Icon="Github" VerticalAlignment="Center" HorizontalAlignment="Center"
Width="80" Height="80" Name="Github"></fa:ImageAwesome>
<fa:ImageAwesome Icon="PieChart" VerticalAlignment="Center" HorizontalAlignment="Center"
Width="80" Height="80"></fa:ImageAwesome>
<fa:ImageAwesome Icon="Google" VerticalAlignment="Center" HorizontalAlignment="Center"
Width="80" Height="80"></fa:ImageAwesome>
<fa:ImageAwesome Icon="Code" VerticalAlignment="Center" HorizontalAlignment="Center"
Width="80" Height="80"></fa:ImageAwesome>
</StackPanel>
<!--Add the spinner icon-->
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
<fa:ImageAwesome Icon="Spinner" Spin="True" SpinDuration="10" Rotation="40" Width="50" Height="50" />
<fa:ImageAwesome Icon="Instagram" Spin="True" SpinDuration="10" Rotation="40" Width="50" Height="50" Foreground="Violet" />
<fa:ImageAwesome Icon="Twitter" Spin="True" SpinDuration="50" Rotation="10" Width="50" Height="50" Foreground="DeepSkyBlue" />
</StackPanel>
</> The Source Code is available in Github.com/CoreProgramm/
Summary
Post a Comment