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;
}
}
|
Grid grid = new Grid();
radialMenu.CenterButtonFontFamily = Device.RuntimePlatform == Device.Android ? "Edsembli.ttf" : Device.RuntimePlatform == Device.iOS ? "Edsembli" : "Edsembli.ttf#Edsembli";
radialMenu.CenterButtonText = "h";
radialMenu.CenterButtonRadius = 32;
radialMenu.SelectionColor = Color.Red;
string[] radialMenuItems = new string[] { "i", "j", "k", "p", "r", "l" };
for (int itemCount = 0; itemCount < radialMenuItems.Count(); itemCount++)
{
radialMenu.Items.Add(new SfRadialMenuItem()
{
FontIconText = radialMenuItems[itemCount],
IconFontSize = 25,
IconFontFamily = Device.RuntimePlatform == Device.Android ? "Edsembli.ttf" : Device.RuntimePlatform == Device.iOS ? "Edsembli" : "Edsembli.ttf#Edsembli"
});
}
grid.Children.Add(radialMenu);
this.Content = grid; |