I have a ContentPane with a Command_CanExecute handler that is context specific, but the same command is availabe in the MainWindow with the XDM. If e.CanExecute is false in the ContentPane, I don't want that same command to be executable in the MainWindow either. I assumed e.Handled = true in the ContentPane would keep the event from bubbling, but apparently it is bbubling, because when e.CanExecute == false in the ContentPane and e.Handled == true, the command can execute in the MainWindow (the MainWindow has no Command_CanExecute, making the command always executable. I added a Command_CanExecute to the MainWindow but the command was still executable).
When the command cannot execute in the ContentPane, how can I also block it in the MainWindow? Thanks.
Did you try setting e.ContinueRouting to false?
Yes. I thought maybe it was because I didn't have a CanExecute in the MainWindow, letting that default, but adding one had no effect. Thanks.
If you can provide a sample that demonstrates the issue I can take a look to see if there is something you can do or if there is something that we can change to accommodate it.
Hello Darryl,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.
I am attaching a sample application(DockManagerContentPaneCommand.zip) where I am using a Command for adding additional menu item of the context menu of a content pane. It will be great, if you can modify it.
I'll go ahead and give you credit since I over-simplified the description of the scenario, and a sample is a bit more than I have time for right now. But I believe this is more related to the key gestures. Thanks.
That would be great. I'll get one to you over the weekend for you to look at next week.