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.