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
Hi Danko,
Sorry. I hadn't had a chance to try your suggestion until this morning.
It works perfect!
Thank you!
Hello Jim,
Please let me know if this is acceptable for you or if you have any further questions on this matter.
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.