WPF Two Commands handlers, One Command
Posted
by Aran Mulholland
on Stack Overflow
See other posts from Stack Overflow
or by Aran Mulholland
Published on 2010-03-15T04:36:26Z
Indexed on
2010/03/15
4:39 UTC
Read the original article
Hit count: 467
Im deriving from a third party control. It is implementing ApplicationCommands.SelectAll. However the behaviour i want is slightly different. there is no virtual method i can override, and when i register a class handler, like so
CommandManager.RegisterClassCommandBinding(typeof(MyDerivedControl), new CommandBinding(ApplicationCommands.SelectAll, new ExecutedRoutedEventHandler(OnExecutedSelectAll), new CanExecuteRoutedEventHandler(OnCanExecuteSelectAll)));
My methods do not get called. The third party control i am deriving from is marking
e.Handled=true;
in its command handlers ( i know this cause i have seen the source, but i cant modify it )
What can i do?
© Stack Overflow or respective owner