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

Static Context Menu

1 Answer 110 Views
RadialMenu
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 03 Jun 2015, 07:43 AM

Hi

I have the radial menu working as a standalone and can see how it works as a context menu to an element, but how do I define the context menu so it can be used by many elements of the same type.

In my app the user can double click on one of 20 items, some items are of the same type, say some are 'apples' and some are 'oranges', theses elements are added to visual tree in code, when the user double clicks one I want to be able to determine the items type and then display the correct radial menu as a context menu.

I have seen examples for other platforms, but the WPF docs do not cover this functionality.

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 05 Jun 2015, 03:11 PM
Hi Jason,

Please note that, every RadialMenu listens for the event (or KeyBinding) of its TargetElement and then opens as context menu. So what you can do is use one RadialMenu and replace its ItemsSource with the items for the specific control type as shown in the SharedRadialContextMenuItemsSource.zip project.

Also in the SharedRadialContextMenu.zip you can observed how to create one instance of RadialMenu and set it to multiple elements. You can use this approach and create one RadilMenu for 'apples' and one 'oranges' and when adding  the control to the visual tree you can set the corresponding RadialMenu according to the type.

Hope this would help.

Regards,
Georgi
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
RadialMenu
Asked by
Jason
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or