Check out https://github.com/MartinTopfstedt/FontAwesome6/tree/release/v1.0.0
WPF (.Net and .Net Core) and UWP/WinUI controls for the iconic SVG, font, and CSS toolkit Font Awesome 5.
Font Awesome: https://github.com/FortAwesome/Font-Awesome
- Current Version: v5.15.4
- Install the FontAwesome5 NuGet Package:
Install-Package FontAwesome5
The usage is the same like the version from charri, just the FontAwesomeIcon enumeration has changed to EFontAwesomeIcon and has the Styles included, which means "Flag" changed to "Solid_Flag" or "Regular_Flag", and the name space changed from "https://schemas.fontawesome.io" to "https://schemas.fontawesome.com".
https://github.com/charri/Font-Awesome-WPF/blob/master/README-WPF.md#usage-xaml
The SvgAwesome can be used like the ImageAwesome.
<Window x:Class="FontAwesome5.WPF.Example"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fa5="https://schemas.fontawesome.com/icons/"
Title="FontAwesome5.WPF.Example" Height="300" Width="300">
<Grid Margin="20">
<fa5:SvgAwesome Icon="Solid_Flag" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
</Window>
https://github.com/charri/Font-Awesome-WPF/blob/master/README-WPF.md#imagesourceconverter
This is the same like the ImageSourceConverter, except it does use the Svg information to draw the icon instead of the font.
Gets the Label/Name of a EFontAwesomeIcon. The converter parameter can contain a format string, where {0} is the label/name and {1} is the style.
Example:
<Window x:Class="FontAwesome5.WPF.Example"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fa5="https://schemas.fontawesome.com/icons/"
Title="FontAwesome5.WPF.Example" Height="300" Width="300">
<Window.Resources>
<fa5:LabelConverter x:Key="LabelConverter"/>
</Window.Resources>
<Grid Margin="20">
<TextBlock Text="{Binding EFontAwesomeIcon, Converter={StaticResource LabelConverter}}"/>
<TextBlock Text="{Binding EFontAwesomeIcon, Converter={StaticResource LabelConverter}, ConverterParameter='{}{0} ({1})'}"/>
</Grid>
</Window>
Gets the EFontAwesomeStyle of a EFontAwesomeIcon.
Example:
<Window x:Class="FontAwesome5.WPF.Example"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:fa5="https://schemas.fontawesome.com/icons/"
Title="FontAwesome5.WPF.Example" Height="300" Width="300">
<Window.Resources>
<fa5:StyleConverter x:Key="StyleConverter"/>
</Window.Resources>
<Grid Margin="20">
<TextBlock Text="{Binding EFontAwesomeIcon, Converter={StaticResource StyleConverter}}"/>
</Grid>
</Window>