We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

FontIconText

Assigning the same FontIconText string in C# doesn't work the same as in Xaml. The rendered menu just displayes the "i" as the option not the icon text.

Previously I had creates the items collection for the Radial Menu in Xaml and that worked fine:

<radialMenu:SfRadialMenuItem ItemTapped="OnSaveRadialMenuItemTapped" FontIconText="i" IconFontFamily="{StaticResource customfontfamily}"></radialMenu:SfRadialMenuItem>

c# (doesn't render the icon):

 var item = new SfRadialMenuItem() {
                FontIconText = "i",
                IconFontFamily = Device.RuntimePlatform == Device.Android ? "Edsembli" : "Edsembli.ttf";,
            };

1 Reply

MK Muneesh Kumar G Syncfusion Team August 7, 2019 12:59 PM UTC

Hi Mario, 
 
We have analyzed your requirement “FontIconText string in C# doesn't working in SfRadialMenu” from our side. We have prepared the sample for your reference. Please try the attached below sample and let us know if you have any concern on this. 
 
Code snippet: 
   public partial class MainPage : ContentPage 
    { 
        SfRadialMenu radialMenu = new SfRadialMenu(); 
        public MainPage() 
        { 
            InitializeComponent(); 
            Grid grid = new Grid(); 
            radialMenu.CenterButtonFontFamily = Device.RuntimePlatform == Device.Android ? "radialmenu_Segoe MDL2 Assets.ttf" : Device.RuntimePlatform == Device.iOS ? "Segoe MDL2 Assets" : "radialmenu_Segoe_MDL2_Assets.ttf#Segoe MDL2 Assets"; 
            radialMenu.CenterButtonText = "\uE713"; 
            radialMenu.CenterButtonRadius = 32; 
            string[] radialMenuItems = new string[] { "\uE734", "\uE700", "\uE72d", "\uE735", "\uE700", "\uE73a" }; 
            for (int itemCount = 0; itemCount < radialMenuItems.Count(); itemCount++) 
            { 
                radialMenu.Items.Add(new SfRadialMenuItem() 
                { 
                    FontIconText = radialMenuItems[itemCount], 
                    IconFontSize = 25, 
                    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" 
                }); 
            } 
            grid.Children.Add(radialMenu); 
            this.Content = grid; 
        } 
    } 
 
Sample Link: 
 
Thanks, 
Muneesh Kumar G. 


Loader.
Live Chat Icon For mobile
Up arrow icon