How to Create a Radial Menu in C#
By FoxLearn 7/16/2024 12:50:16 PM 14.43K
What is a radial menu?
A RadialMenu is a fully customizable Microsoft OneNote 2013-inspired menu in which items are arranged along the circumference. And at runtime, the Radial Menu can be opened using the RadialMenu.ShowPopup method.
How to use Radial Menu in C#
Opening your Visual Studio, then click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "RadialMenuApp" and then click OK
If you have not yet installed DevExpress .NET product, you can view How to download and install DevExpress
Drag and drop SimpleButton, ImageCollection and RadialMenu controls from the Visual Studio toolbox into your form designer.
Next, Add item to the RadialMenu control, then add icon to the BarLargeButtonItem.
Finally, Open your form code behind, then add a click event handler to the Show button that allows you to show the radial menu.
private void simpleButton1_Click(object sender, EventArgs e) { Point p = this.Location; p.Offset(this.Width / 2, this.Height / 2); radialMenu1.ShowPopup(p); }
Selecting the item on RadialMenu control, then add a click event handler to the BarLargeButtonItem.
private void barLargeButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XtraMessageBox.Show("Thank you for watching this video !", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); }
It will show a message box when clicking the item on radial menu.
VIDEO TUTORIAL
- How to Download and Install DevExpress
- How to use DevExpress Themes/Skins in C#
- How to use Ribbon Control in C#
- How to use DevExpress Project Converter
- How to get icons from the DX Image Gallery
- How to set default font for RichEditControl
- How to Clear content in RichEditControl
- How to use CheckedComboBoxEdit with SearchControl in C#