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
1830
CanExecute Event Routing in Child and Parent Controls
posted

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.

Parents Reply Children
No Data