wpfcaliburn.microcaliburn

WPF Font Awesome not working with Caliburn.Micro?


With caliburn.micro I can't access to any third-party fonts in my folder in my WPF Solution, and I was able to ensure the following:

And I still cannot retrieve icons from Font Awesome.

The XAML code from my button:

<Button Name="MailButton"               
        Grid.Row="1" Grid.Column="2"
        Width="60" Height="60" 
        Content="&#xf101;" 
        FontSize="30" 
        Foreground="White" 
        BorderThickness="0"  
        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" 
        BorderBrush="{x:Null}"
        FontFamily="./Font/#FontAwesome"
        Background="#FF085078"/>

In my second project without using the Caliburn font, it worked, even when I tried to access it in the same way as I did in my first project. What can I do more to make this font working? What properties of my project should I check first?


Solution

  • You need to delete the leading period (.) from the font family path, then you can access your font. Example:

    FontFamily = "/Font/#FontAwesome"