)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to close the RadialMenu on clicking a menu item?

Platform: WPF |
Control: SfRadialMenu |
Published Date: May 18, 2016 |
Last Revised Date: June 24, 2019 |
.NET Framework: 4.5 |
Product Version: 13.4.0.53

To close a RadialMenu on clicking the RadialMenuItem, set CloseOnExecute property to True for menuitems.  The same has been demonstrated in the following code example:

XAML:

<Window x:Class="SfRadialMenuItem_New.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:navigation="clr-namespace:Syncfusion.Windows.Controls.Navigation;assembly=Syncfusion.SfRadialMenu.Wpf"
Title="MainWindow" Height="350" Width="525">
<Grid x:Name="Grid1">
<navigation:SfRadialMenu x:Name="_Radialmenu">
<navigation:SfRadialMenuItem Header="MenuItem1" CloseOnExecute="True" />
<navigation:SfRadialMenuItem Header="MenuItem2" CloseOnExecute="True"/>
<navigation:SfRadialMenuItem Header="MenuItem3" CloseOnExecute="True"/>
<navigation:SfRadialMenuItem Header="MenuItem4" CloseOnExecute="True"/>
<navigation:SfRadialMenuItem Header="MenuItem5" CloseOnExecute="True"/>
</navigation:SfRadialMenu>
</Grid>
</Window>

 

C#:

namespace SfRadialMenuItem_New
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
SfRadialMenu _Radialmenu = new SfRadialMenu();
SfRadialMenuItem Item1 = new SfRadialMenuItem();
Item1.Header = "MenuItem1";
Item1.CloseOnExecute = true;
SfRadialMenuItem Item2 = new SfRadialMenuItem();
Item2.Header = "MenuItem2";
Item2.CloseOnExecute = true;
SfRadialMenuItem Item3 = new SfRadialMenuItem();
Item3.Header = "MenuItem3";
Item3.CloseOnExecute = true;
SfRadialMenuItem Item4 = new SfRadialMenuItem();
Item4.Header = "MenuItem4";
Item4.CloseOnExecute = true;
SfRadialMenuItem Item5 = new SfRadialMenuItem();
Item5.Header = "MenuItem5";
Item5.CloseOnExecute = true;
_Radialmenu.Items.Add(Item1);
_Radialmenu.Items.Add(Item2);
_Radialmenu.Items.Add(Item3);
_Radialmenu.Items.Add(Item4);
_Radialmenu.Items.Add(Item5);
Grid1.Children.Add(_Radialmenu);
}
}
}
 

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon