This is a migrated thread and some comments may be shown as answers.

How to keep a Popup Menu Opened for Radmenu

4 Answers 234 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Anita
Top achievements
Rank 1
Anita asked on 06 Oct 2010, 09:41 AM
Hi,

I am using RadMenu for my project, i want when i click on submenuitem the parent menuitem popup should be open.
For Example:

 

 

 

<telerik:RadMenu Grid.Column="1" Grid.Row="1" Height="100" HorizontalAlignment="Left" Margin="98,40,0,0" Name="radMenu1" VerticalAlignment="Top" Width="200" >

 

 

 

 

<telerik:RadMenuItem Header="File" StaysOpenOnClick="True">

 

 

 

 

<telerik:RadMenuItem Header="New" ></telerik:RadMenuItem>

 

 

 

 

<telerik:RadMenuItem Header="Open"></telerik:RadMenuItem>

 

 

 

 

<telerik:RadMenuItem Header="Close"></telerik:RadMenuItem>

 

 

 

 

</telerik:RadMenuItem>

 

 

 

 

<telerik:RadMenuItem Header="Edit">

 

<telerik:RadMenuItem Header="Cut" ></telerik:RadMenuItem>

 

 

 

 

 

 

 

 

<telerik:RadMenuItem Header="Paste"></telerik:RadMenuItem>

 

 

 

 

</

 

 

telerik:RadMenuItem>

 

 

 

 

</telerik:RadMenu>

In the above Radmenu if i click on 'File' menuitem i am able to see 3 Menuitem(New,Open and Close).
When i click 'Open' MenuItem , i want to see the 'File' Popup should be open. I can achieve it by setting 'IsSubMenuOpen' property but in RadMenuItem this property is Readonly.

Please Help me to achieve this ..

Thanks & Regards,
Anita.

 

4 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 06 Oct 2010, 11:47 AM
Hello Anita,

RadMenuItem class have StaysOpenOnClick property. By default it is false so when menu item is clicked it fires its command (if set) fires Click event and then closes everything. This is the default Menu behavior.
If you need to change it you can set StaysOpenOnClick=True on all RadMenuItems that you want to override this behavior. Then clicking on item with StaysOpenOnClick=True will not close the menu.
If you want to set it to all items you can create implicit Style (style without x:Key) and set this property there so that it will affect all instances of RadMenuItem.

Let us know if you need more information.

All the best,
Hristo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nihat
Top achievements
Rank 1
answered on 14 Nov 2010, 01:52 AM
Hi,

you wrote "RadMenuItem class have StaysOpenOnClick property. [...]".
Can you provide a small example how to achieve this pls?
Need to stay a Radmenu open after a postback.

Kind regards
0
Hristo
Telerik team
answered on 16 Nov 2010, 04:26 PM
Hi Nihat Özkan,

What do you mean by "stay a Radmenu open after a postback". There is no such concept in WPF world.
Do you need such feature for RadMenu for WPF or you are referring to RadMenu for ASP.NET?

In WPF/Silverlight this is property that can be set in XAML or code:
...
<telerik:RadMenuItem StaysOpenOnClick="True" />
...

Let us know which platform you are referring to.

Best wishes,
Hristo
the Telerik team
See What's New in RadControls for WPF in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
Nihat
Top achievements
Rank 1
answered on 16 Nov 2010, 04:33 PM
Hi Hristo,

sorry my fault.
I should check twice in which forum i post, before i do.

Indeed i meant RadMenu for ASP.net, didn't realize, that the WPF-Menu also is named RadMenu.

Nevermind,
Nihat
Tags
Menu
Asked by
Anita
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Nihat
Top achievements
Rank 1
Share this question
or