New to Telerik UI for .NET MAUI? Start a free 30-day trial

Using Font Icons in Telerik UI for .NET MAUI

Environment

Version Product Author
6.7.0 Telerik UI for .NET MAUI Font Icons Dobrinka Yordanova

Description

How can I use font icons in Telerik UI for .NET MAUI, and where can I find the complete list of available font icons?

Solution

To use font icons in your Telerik UI for .NET MAUI application, follow these steps:

  1. Download the font file.

  2. Add the font to your project by placing it in the Resources/Fonts folder.

  3. Register the font in the MauiProgram.cs file:

.ConfigureFonts(fonts =>
{
    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
    fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
    fonts.AddFont("telerikfontexamples.ttf", "TelerikFontExamples");
});
  1. Consume the font icon in your XAML:
<Label Text="&#xE80A;" FontFamily="TelerikFontExamples" FontSize="Micro" FontAttributes="Bold" TextColor="Black" />

To find the complete list of available font icons, you can use an extension such as the iconfont-preview extension for Visual Studio Code.

See Also

In this article