Changing Font Icon in WPF using Font Awesome

Font Awesome has NuGet packages named FontAwesome.UWP and FontAwesome.WPF. Just download one of this.

NuGet Packages for Font Awesome

If you will use a icon import follow namespace into your XAML code:

xmlns:fa="http://schemas.fontawesome.io/icons/"

Use it into your button like this:

<Button x:Name="btnButton">
    <Button.Content>
        <fa:ImageAwesome Icon="LongArrowLeft"/>
    </Button.Content>
</Button>

And finally in your C# code behind:

using FontAwesome.WPF; // on the top of the code
btnButton.Content = FontAwesomeIcon.LongArrowRight;

Leave a Comment