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

    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.

  2. Georgi
    Admin
    Georgi avatar
    347 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 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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top