Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
925
Context menu on context menu
posted

Hi,

We have changed the old implementing context menu xamMenuItems to use Infragistic's xamContextMenu. However, we struggled to convert to show second context menu on context menu. Similar example would in Windows 10, when you right click on running application in the task bar it shows application menu to pin or launch. On application name you can do another right click which will display additional context menu with Open, run as Administrator and etc.

How to achieve this with xamContextMenu control?

Parents
No Data
Reply
  • 1700
    Offline posted

    Hello Tomas,

    I’ve tried implementing a XamContextMenu within another XamContextMenu by initializing it in code and then handling the RightMouseButtonUp event of the XamMenuItem or the XamContextMenu. Inside the event handler the mouse position should be captured after that in order to display the sub-context menu the coordinates of the mouse position should be set as Vertical and Horizontal offset of the sub-menu. After that the IsOpen property of the sub-menu needs to be set to true, in order to display it.

    The only limitation to this approach is that once the sub-menu shows the main context menu disappears.

    Below I am sending a small sample application that demonstrates what I have explained above.

    Please test the sample on your side and let me know if you have any questions or concerns.

    Regards,
    Ivan Kitanov

    XamContextMenuWithinXamContextMenu.zip

Children