CommandManager.InvalidateRequerySuggested()
is called automatically every time a key has been pressed, when the focus has changed etc. I'd like to prevent this from happening under certain conditions (for example only call it when keys pressed are not Up
or Down
) and do my own handling of RoutedCommands
, because InvalidateRequerySuggested()
always processes all commands and is a bit slow.
I can see in the reference source where InvalidateRequerySuggested
is called, but I don't see a way to intervene there. There is a PreProcessInput
event, but the necessary information you'd need from it is hidden in internal classes like InputReportEventArgs
.
Is there a way?