|
1 | | -This package contains[.NET MAUI Radial Menu](https://www.syncfusion.com/maui-controls/maui-radial-menu) component for .NET MAUI application |
2 | 1 |
|
3 | | -### System Requirements |
| 2 | +# Getting Started with .NET MAUI RadialMenu (SfRadialMenu) |
4 | 3 |
|
5 | | -* [System Requirements](https://help.syncfusion.com/maui/system-requirements) |
| 4 | +This section provides a quick overview for working with the SfRadialMenu for .NET MAUI. Walk through the entire process of creating a real world of this control. |
6 | 5 |
|
7 | | -### Radial Menu |
| 6 | +## Creating an application using the .NET MAUI RadialMenu |
| 7 | + 1. Create a new .NET MAUI application in Visual Studio. |
| 8 | + 2. Syncfusion .NET MAUI components are available on [nuget.org](https://www.nuget.org/). To add SfRadialMenu to your project, open the NuGet package manager in Visual Studio, search for Syncfusion.Maui.RadialMenu and then install it. |
8 | 9 |
|
9 | | -The Syncfusion [.NET MAUI Radial Menu](https://www.syncfusion.com/maui-controls/maui-radial-menu) it displays menu items in a circular layout.It can accommodate more menu items in the given space than the traditional vertical or horizontal menu. |
| 10 | +## Register the handler |
10 | 11 |
|
11 | | - |
| 12 | +To use this control inside an application, you must register the handler for Syncfusion® core. |
12 | 13 |
|
13 | | -[Features Overview](https://www.syncfusion.com/maui-controls/maui-radial-menu) | [Docs](https://help.syncfusion.com/maui/radial-menu/overview) | [Online Demo](https://github.com/syncfusion/maui-demos) | [Support](https://support.syncfusion.com/support/tickets/create) | [Forums](https://www.syncfusion.com/forums/maui) | [Feedback](https://www.syncfusion.com/feedback/maui) |
| 14 | +**MauiProgram.cs** |
| 15 | +``` |
| 16 | +using Microsoft.Extensions.Logging; |
| 17 | +using Syncfusion.Maui.Core.Hosting; |
14 | 18 |
|
15 | | -#### Getting Started |
| 19 | +namespace RadialMenuGettingStarted |
| 20 | +{ |
| 21 | + public static class MauiProgram |
| 22 | + { |
| 23 | + public static MauiApp CreateMauiApp() |
| 24 | + { |
| 25 | + var builder = MauiApp.CreateBuilder(); |
| 26 | + builder |
| 27 | + .UseMauiApp<App>() |
| 28 | + .ConfigureSyncfusionCore() |
| 29 | + .ConfigureFonts(fonts => |
| 30 | + { |
| 31 | + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); |
| 32 | + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); |
| 33 | + }); |
16 | 34 |
|
17 | | -* [Getting Started with .NET MAUI Radial Menu](https://help.syncfusion.com/maui/radial-menu/getting-started) |
| 35 | +#if DEBUG |
| 36 | + builder.Logging.AddDebug(); |
| 37 | +#endif |
| 38 | +
|
| 39 | + return builder.Build(); |
| 40 | + } |
| 41 | + } |
| 42 | +} |
| 43 | +
|
| 44 | +``` |
| 45 | + |
| 46 | +## Add a basic SfRadialMenu |
| 47 | +1. Import the control namespace `Syncfusion.Maui.RadialMenu` in XAML or C# code. |
| 48 | +2. Initialize [SfRadialMenu](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfRadialMenu.html) control. |
| 49 | + |
| 50 | +**XAML** |
| 51 | +``` |
| 52 | +<ContentPage |
| 53 | + . . . |
| 54 | + xmlns:radialMenu="clr-namespace:Syncfusion.Maui.RadialMenu;assembly=Syncfusion.Maui.RadialMenu"> |
| 55 | + <radialMenu:SfRadialMenu /> |
| 56 | +</ContentPage> |
| 57 | +``` |
| 58 | + |
| 59 | +**C#** |
| 60 | +``` |
| 61 | +using Syncfusion.Maui.Core; |
| 62 | +. . . |
| 63 | +
|
| 64 | + using Syncfusion.Maui.RadialMenu; |
| 65 | + namespace RadialMenuGettingStarted |
| 66 | + { |
| 67 | + public partial class MainPage : ContentPage |
| 68 | + { |
| 69 | + public MainPage() |
| 70 | + { |
| 71 | + InitializeComponent(); |
| 72 | + SfRadialMenu radialMenu = new SfRadialMenu(); |
| 73 | + this.Content = radialMenu; |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | +
|
| 78 | +``` |
| 79 | + |
| 80 | +## Adding Radial Menu with items |
| 81 | + |
| 82 | +**XAML** |
| 83 | + |
| 84 | +``` |
| 85 | +<ContentPage |
| 86 | + ... |
| 87 | + xmlns:radialMenu="clr-namespace:Syncfusion.Maui.RadialMenu;assembly=Syncfusion.Maui.RadialMenu"> |
| 88 | + <radialMenu:SfRadialMenu x:Name="radialMenu" |
| 89 | + CenterButtonText="Edit" |
| 90 | + CenterButtonFontSize="15"> |
| 91 | + <radialMenu:SfRadialMenu.Items> |
| 92 | + <radialMenu:SfRadialMenuItem Text="Cut" |
| 93 | + FontSize="15"/> |
| 94 | + <radialMenu:SfRadialMenuItem Text="Copy" |
| 95 | + FontSize="15"/> |
| 96 | + <radialMenu:SfRadialMenuItem Text="Paste" |
| 97 | + FontSize="15"/> |
| 98 | + <radialMenu:SfRadialMenuItem Text="Crop" |
| 99 | + FontSize="15"/> |
| 100 | + <radialMenu:SfRadialMenuItem Text="Paint" |
| 101 | + FontSize="15"/> |
| 102 | + </radialMenu:SfRadialMenu.Items> |
| 103 | + </radialMenu:SfRadialMenu> |
| 104 | +</ContentPage> |
| 105 | +``` |
| 106 | + |
| 107 | +**C#** |
| 108 | + |
| 109 | +``` |
| 110 | +using Syncfusion.Maui.RadialMenu; |
| 111 | +
|
| 112 | +namespace RadialMenuGettingStarted |
| 113 | +{ |
| 114 | + public partial class MainPage : ContentPage |
| 115 | + { |
| 116 | + public MainPage() |
| 117 | + { |
| 118 | + InitializeComponent(); |
| 119 | +
|
| 120 | + SfRadialMenu radialMenu = new SfRadialMenu() |
| 121 | + { |
| 122 | + CenterButtonText = "Edit", |
| 123 | + CenterButtonFontSize = 15 |
| 124 | + }; |
| 125 | +
|
| 126 | + RadialMenuItemsCollection itemCollection = new RadialMenuItemsCollection(); |
| 127 | + itemCollection.Add(new SfRadialMenuItem() |
| 128 | + { |
| 129 | + Text = "Cut", |
| 130 | + FontSize = 15 |
| 131 | + }); |
| 132 | + itemCollection.Add(new SfRadialMenuItem() |
| 133 | + { |
| 134 | + Text = "Copy", |
| 135 | + FontSize = 15 |
| 136 | + }); |
| 137 | + itemCollection.Add(new SfRadialMenuItem() |
| 138 | + { |
| 139 | + Text = "Paste", |
| 140 | + FontSize = 15 |
| 141 | + }); |
| 142 | + itemCollection.Add(new SfRadialMenuItem() |
| 143 | + { |
| 144 | + Text = "Crop", |
| 145 | + FontSize = 15 |
| 146 | + }); |
| 147 | + itemCollection.Add(new SfRadialMenuItem() |
| 148 | + { |
| 149 | + Text = "Paint", |
| 150 | + FontSize = 15 |
| 151 | + }); |
| 152 | + radialMenu.Items = itemCollection; |
| 153 | + this.Content = radialMenu; |
| 154 | + } |
| 155 | + } |
| 156 | +} |
| 157 | +
|
| 158 | +``` |
| 159 | + |
| 160 | +Run the application to render the following output: |
| 161 | + |
| 162 | + |
18 | 163 |
|
19 | 164 | ## License |
20 | 165 | This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/eula/es/?utm_source=nuget&utm_medium=listing&utm_campaign=maui-signaturepad-nuget). You can purchase a license [here]( https://www.syncfusion.com/sales/products?utm_source=nuget&utm_medium=listing&utm_campaign=maui-signaturepad-nuget) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials?utm_source=nuget&utm_medium=listing&utm_campaign=maui-signaturepad-nuget). |
|
0 commit comments