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
140
stackpanel in menutool of xamribbon?
posted

Hello to all. I put a stackpanel in a menutool, but when I press it, the stackpanel closes, is there a way to not close the menutool and stackpanel when I press the stackpanel or something inside when I click it? thank you

Parents
No Data
Reply
  • 34850
    Offline posted

    Hello Flavio,

    In order to prevent the MenuTool from closing when clicking the StackPanel inside, I would recommend hooking into the PreviewMouseUp event of your StackPanel and marking it handled by setting the e.Handled property to true, where "e" is the event arguments of the PreviewMouseUp event. This will prevent the normal MouseUp event from bubbling up to the menu item that will normally close the MenuTool.

    I have attached a sample project to demonstrate the above.

    Please let me know if you have any other questions or concerns on this matter.

    XamRibbonMenuToolNoClose.zip

Children