I have two Menu items in a wpf context, I bind them with command, how do I hide context menu when both items are not available, I mean when both commands cannot be executed?
Add an event handler for ContextMenuOpening event. Set Handled property in ContextMenuEventArgs object to true and the context menu will not open.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With