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
375
unable to open control specific context menu under XamDockManager.
posted

Hi Everyone,

I am unable to open control specific context menu under XamDockManager. In floating state when I right click on any popup element on window it shows dockpanel context menu. 

  • I don't want to show dockPanel context menu
  • I want to show control specific context menu

I have created a sample application depicting the problem we are facing, In a dock panel  when you click the icon, it will open up a popup, this popup contains a textbox which should have it's own contextmenu but on right click it shows the contextmenu of dockpanel. Your help will be really appreciated.

XamDocManagerIssue.zip
Parents
No Data
Reply
  • 1935
    posted

    Hello Gottfried Gillich,

    Thank you for providing a sample!

    I have taken a look at your scenario and what you could do is to handle the ContextMenuOpening event for both the Border and the TextBox elements.

    Please note that e.Handled should be set to "true" that will prevent the showing of the dockPanel context menu. Afterwards, the context menu's IsOpen is set to true that will display the specific context menu.

    Please take a look at the modified attached sample let me know if you have any questions on this matter.

    XamDocManagerIssue.zip
Children