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

Context Menu

1 Answer 81 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Voss Grose
Top achievements
Rank 1
Voss Grose asked on 14 Jul 2009, 03:39 PM
1. Can a context menu be attached/launched from anywhere/any control? Say I have a custom control...can I show the context menu from it?

2. What about the Right Click...does that only work from a menu control itself or is there a way to wire that up as well from a custom user control?

Basically I want to PopUp a context menu from one of my custom user controls and ideally would do it from a right click.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 15 Jul 2009, 07:19 AM
Hi Voss Grose,

RadContextMenu is separate control. It can be attached to any UIElement using the RadContextMenu.ContextMenu property. You can do this in XAML or in code (using the RadContextMenu.SetContextMenu method). Further you can set event name property on RadContextMenu to specify on which event the Menu will open. This can be any event on you control. You can set it to empty string and open the menu manually using the IsOpen=true property.
RightClick is the default event for RadContextMenu but it requires that your Silverlight plug-in is in Windowless mode.
You can find more examples from our QSF:
http://demos.telerik.com/silverlight/#ContextMenu/PopUpMenu

Let us know if you need more information.

Regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
Voss Grose
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or