New to Telerik UI for Xamarin? Download free 30-day trial

Telerik UI for Xamarin Font Icons

Telerik font icons is a collection of small vector graphics used across the components from Telerik UI for Xamarin suite. Examples of using font icons include the expand and collapse indicators of Accordion, Expander and TreeView controls, filter and sort indicators of DataGrid control, and other.

This article will give an overview on how you can utilize the Telerik font icons in your app.

  • Include the required Telerik Font file
  • Add the font file path
  • Choose between the available Telerik icons

Include the required Telerik Font file

  1. The Telerik Font Icons are located in the telerikfontexamples.ttf file. There are two options you could use to get the .ttf file.

    • Download the telerikfontexamples.ttf file from Telerik UI for Xamarin Samples App GitHub repo.

    • Get the font file from the installation folder of Telerik UI for Xamarin - here is the path to the exact location: Telerik UI for Xamarin [version]\QSF\QSF.Android\Assets\Fonts

  2. Include Telerik Font .ttf file into your application in the following locations:

    • Android project: Create Fonts folder inside the Android Assets and add the .ttf file there.

    • iOS project: Create Fonts folder inside the iOS Resources and add the .ttf file there.

    You'd also need to modify the info.plist file inside the iOS project with adding the following code:

        <key>UIAppFonts</key>
      <array>
        <string>Fonts/telerikfontexamples.ttf</string>
      </array>
    ```
    
    • UWP project: Create Fonts folder inside the UWP Assets and add the .ttf file there.

    Add the font file path

    As a final step you need to add the path to the Fonts inside the Resources of the App.xaml file of the Xamarin.Forms project:

    <Application.Resources>
        <ResourceDictionary>          
            <OnPlatform x:TypeArguments="x:String" x:Key="IconsFont">
                <On Platform="iOS">telerikfontexamples</On>
                <On Platform="Android">Fonts/telerikfontexamples.ttf#telerikfontexamples</On>
                <On Platform="UWP">/Assets/Fonts/telerikfontexamples.ttf#telerikfontexamples</On>
            </OnPlatform>
        </ResourceDictionary>
    </Application.Resources>
    

    Choose between the available Telerik icons

    You can choose any of the available Telerik Font icons:

    Telerik Font Icons
    sort_descent &#xe800; star-empty &#xe801; filter &#xe802;
    sort_ascent &#xe803; group &#xe804; star &#xe805;
    right-dir &#xe806; dots_vert &#xe807; menu &#xe808;
    check &#xe809; cancel &#xe80a; dot &#xe80b;
    check &#xe80c; down-dir &#xe80d; left-open-big &#xe80e;
    configure &#xe80f; search &#xe810; up-dir &#xe811;
    pattern &#xe812; add &#xe813; right-dir-outlines &#xe814;
    info &#xe815; down-dir-outlines &#xe816; bin-solid &#xe817;
    edit &#xe818; copy &#xe819; arrow-up &#xe81a;
    airplane &#xe81c; pdf &#xe81d; encoding &#xe81e;
    length &#xe81f; arrow-right &#xe820; contacts &#xe821;
    cog-outlines &#xe822; type &#xe823; location &#xe824;
    link &#xe825; archive &#xe826; bin &#xe827;
    draft &#xe828; folder-open &#xe829; folder &#xe82a;
    group &#xe82b; item &#xe82c; sent &#xe82d;
    spam &#xe82e; warning &#xe82f; lock &#xe830;
    thickness &#xe831; car &#xe832; shopping-bag &#xe833;
    coffee-cup &#xe834; get-money &#xe835; shopping-user &#xe836;
    group_users &#xe837; dashboard &#xe838; location &#xe83d;
    link &#xe83e; assets &#xe846; book &#xe847;
    design &#xe848; graphics &#xe849; image &#xe84a;
    font-size &#xe84b; template &#xe84c; wireframes &#xe84d;
    distance &#xe84e; stopwatch &#xe84f; play &#xe850;
    cancel &#xe851; picture &#xe852; text &#xe853;
    code &#xe854; analysis &#xe855; network &#xe856;
    network &#xe857; bar-chart &#xe858; sap &#xe859;
    dba &#xe85a; home &#xe85b; temperature &#xe85c;
    phone &#xe85d; electricity &#xe85e; wifi &#xe85f;
    distance-horizontal &#xe860; calendar_dayview &#xe861; calendar_multiday &#xe862;
    calendar_week &#xe863; calendar_month &#xe864; calendar_year &#xe865;
    calendar selection single &#xe866; calendar selection multiple &#xe867; calendar selection range &#xe868;
    gallery &#xe869; camera &#xe86a; crop_free &#xe86b;
    crop_original &#xe86c; crop_rect &#xe86d; crop_circular &#xe86e;
    badge &#xe86f; notes &#xe870; time &#xe871;
    calendar_agenda &#xe872; arrows &#xe873; video-camera &#xe87;
    check &#xe876; cancel &#xe877; time &#xe878;
    arrow-down &#xe879; flag &#xe87a; save &#xe87b;
    share &#xe87c; menu-custom &#xe87d; heart-filled &#xe87e;
    heart-empty &#xe87f; reorder &#xe881; arrow-box-left &#xe882;
    arrow-box-right &#xe883; bell-empty &#xe901; chat &#xe903;
    phone &#xe904; menu &#xf008; link-external &#xf08e;
    plus-squared &#xf0fe; angle-left &#xf104; angle-right &#xf105;
    angle-up &#xf106; angle-down &#xf107; spinner &#xf110;
    angle circled left &#xf137; angle circled right &#xf138; minus-squared &#xf146;
    minus squared &#xf147; plus squared &#xf196; emoji &#xe900;

    You need to set the Telerik Font icon code on the concrete property to visualize the icon.

    Examples

    Let's for example change the default icon of the RadDataGrid OptionsButton, used to display the DataGrid Filtering UI with one of the above listed icons (configure icon). DataGrid provides HeaderStyle property for its columns and the DataGridColumnHeaderStyle exposes OptionsButtonText property responsible for the OptionsButton icon.

    The configure icon's code ends with e80f; so this string should be applied to the OptionsButtonText property:

    <telerikGrid:DataGridTextColumn.HeaderStyle>
    <telerikGrid:DataGridColumnHeaderStyle OptionsButtonText="&#xe80f;"/>
    </telerikGrid:DataGridTextColumn.HeaderStyle>
    

    Here is the result:

    See Also

In this article