Articles in this section

How to add the FontIcon into SfRadialMenu in Xamarin.Forms?

You can add the Font Icon into Xamarin RadialMenu and SfRadialMenuItem. The following steps describe how to add a custom font file in the platform-specific projects.

 

Android

Add a custom font file in the Assets folder and set Build Action to AndroidAsset for the font file.

iOS

Step 1: Add a custom font file in the Resources folder and set Build Action to BundleResource. Then, ensure that the copy to output directory is set to AlwaysCopy.

Step 2: Add a custom font file name in the info.plist file as demonstrated in the following code sample.

<dict>……<key>UIAppFonts</key>

<array>

<string> radialmenu_Segoe MDL2 Assets </string>

……</dict>

UWP

Add a custom font file in the Assets folder and set Build Action to Content.

 

Refer to the following code sample to set a custom font and font size of RadialMenu item.

XAML

<ContentPage.Resources>
  <ResourceDictionary>
    <OnPlatform x:TypeArguments="x:String"
                x:Key="customfontfamily"
                iOS="Segoe MDL2 Assets"
                Android="radialmenu_Segoe MDL2 Assets.ttf"
                UWP="radialmenu_Segoe_MDL2_Assets.ttf#Segoe MDL2 Assets"/>
  </ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
  <radialMenu:SfRadialMenu>
    <radialMenu:SfRadialMenu.Items>
      <radialMenu:SfRadialMenuItem FontIconText=""
                                   IconFontSize="10"
                                   IconFontFamily="{StaticResource customfontfamily}"/>
    </radialMenu:SfRadialMenu.Items>
  </radialMenu:SfRadialMenu>
</ContentPage.Content>
</ContentPage>
 

 

C#

SfRadialMenu radialMenu = new SfRadialMenu();
            radialMenu.Items.Add(new SfRadialMenuItem()
            {
                FontIconText = "\uE734",
                IconFontSize = 10,
                IconFontFamily = Device.RuntimePlatform == Device.iOS ? "Segoe MDL2 Assets" : Device.RuntimePlatform == Device.Android ? "radialmenu_Segoe MDL2 Assets.ttf" : "radialmenu_Segoe_MDL2_Assets.ttf#Segoe MDL2 Assets"
            });

 

Output

RadialMenu

 

You can download the complete sample from the following link: Sample

 

I hope you enjoyed learning about how to display a busy indicator till the DataGrid is loading in Xamarin.Android.

You can refer to our Xamarin.Forms RadialMenu feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied