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

how to enable context menu by default to all controls ?

3 Answers 80 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 09 Jul 2013, 05:56 AM
Hi There,

I have the following two requirements:

1. Wanted to add help as a menu item to RadContextMenu item this will be a default menu item, i wanted to do it using a style/controltemplate.

2. wanted to enable Radcontextmenu by default so help will display on all controls when ever user right clicks on any control.

can you please tell me how i can do this?

Thanks in advance.

Regards,
Srinivas.

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 09 Jul 2013, 02:57 PM
Hello Srinivas,

You can attach RadContextMenu to your UserControl and you will be able to open it no matter where you've clicked in it. I'm sending you a sample project demonstrating this behavior. Please check it and inform us if you have any problems or concerns.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ravi
Top achievements
Rank 1
answered on 10 Jul 2013, 09:37 AM
Hi Rosen Vladimirov

Thank you for your help and sample project. 

If we use it on USerControl then the context menu will display on every where include blank areas, but we wanted to display it only on controls, example:textbox etc.. 

is there any way that we can display context menu by default item on context menu and we will enable context menu for all controls by default ? 

Regards,
Srinivas.

0
Rosen Vladimirov
Telerik team
answered on 10 Jul 2013, 10:54 AM
Hello Srinivas,

One way to achieve this is to create a default Style where you attach RadContextMenu. After that you can create different styles for the controls you are using and base them on the default style. I've modified my project to show you how to achieve this. Please check it and inform us if you have any problems or concerns.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ContextMenu
Asked by
Ravi
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Ravi
Top achievements
Rank 1
Share this question
or