I embedded Google's Material Design icon font into my WPF project by adding it into project resources.
The font displayed correctly in Visual Studio designer but showed only tofus (something like
) while running.
What am I doing wrong?
Here's what in App.xaml
code:
<Application.Resources>
<FontFamily x:Key="MaterialIcon">/ExampleProject;component/Resources/#Material Icons</FontFamily>
</Application.Resources>
And here's how I declared the button:
<Button x:Name="ExampleButton" Content="" FontFamily="{DynamicResource MaterialIcon}"/>
Screenshot: