Advertisement
Beginner .NET MAUI, Fonts, Icons & Media

How do you use font icons (icon fonts) in MAUI?

Short answer

Register the icon font (e.g., FontAwesome/Material Icons), then set a Label or button ImageSource to a FontImageSource specifying the glyph unicode and FontFamily. This gives crisp, scalable, tintable icons without image assets.

Save .NET MAUI mock interview
Advertisement
AModel answer
Register the icon font (e.g., FontAwesome/Material Icons), then set a Label or button ImageSource to a FontImageSource specifying the glyph unicode and FontFamily. This gives crisp, scalable, tintable icons without image assets.
<Image>
    <Image.Source>
        <FontImageSource Glyph="&#xf015;" FontFamily="FA" Color="Purple" />
    </Image.Source>
</Image>
Real-world example
A tab bar uses FontAwesome glyphs as icons so they scale sharply and recolor with the theme.
Likely follow-ups
  • Why use icon fonts over PNGs? | What is FontImageSource?
Related topics