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
1375
Cancel NavigationPaneFlyout if clicked using right mouse button
posted

I'm successfully using the NavigationContextMenuInitializing event to build a custom context menu for my ExplorerBar groups. However, with the NavigationPane collapsed, I'd like to prevent the NavigationPaneFlyout from occuring if the user right-clicks to get the context menu.

I see there's a cancel property in the NavigationPaneFlyoutDisplaying event however I'm not sure how to know in that method if the right or left mouse button was clicked.

Any help would be appreciated.

Regards,

Jim

Parents
  • 20872
    Verified Answer
    Offline posted

    Hello Jim,

    What you could try is to set a flag inside a MouseDown event to determine if the left mouse button or right mouse button was clicked. And after that to check for this flag in the NavigationPaneFlyoutDisplaying event and if for expample the right mouse button was clicked to cancel the displaying.

    Please let me know if you have any further questions on this matter.

     

Reply Children