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

open submenu automatically

1 Answer 104 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
robert
Top achievements
Rank 1
robert asked on 17 Oct 2011, 03:12 PM
hello, i have one main menuitem with submenuitems. how can i open / expand the submenu automatically on
right mouse click? the property issubmenuopen is readonly.
thanks for help ...


1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Oct 2011, 12:22 PM
Hello Robert,

RadMenu doesn't provide such a property. The only workaround that I can suggest is to get the RadMenuItemAutomationPeer for this RadMenuItem and then invoke its Click method like this:

RadMenuItemAutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(rootMenuItem) as RadMenuItemAutomationPeer;
if (peer != null)
{
      peer.Invoke();
}

where rootMenuItem is the item that needs to be expanded.

Hope this helps.

Best wishes,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ContextMenu
Asked by
robert
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or