How to keep a Popup Menu Opened for Radmenu

5 posts, 0 answers
  1. Anita
    Anita avatar
    15 posts
    Member since:
    Aug 2010

    Posted 06 Oct 2010 Link to this post

    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.

     

  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 06 Oct 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Nihat
    Nihat avatar
    8 posts
    Member since:
    May 2010

    Posted 13 Nov 2010 Link to this post

    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
  5. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 16 Nov 2010 Link to this post

    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>>
  6. Nihat
    Nihat avatar
    8 posts
    Member since:
    May 2010

    Posted 16 Nov 2010 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready