Static Context Menu

2 posts, 0 answers
  1. Jason
    Jason avatar
    7 posts
    Member since:
    Nov 2012

    Posted 03 Jun 2015 Link to this post


    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.

  2. Georgi
    Georgi avatar
    362 posts

    Posted 05 Jun 2015 Link to this post

    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 project.

    Also in the 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.

    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
Back to Top