Page 1 of 1

Triggering button command on key down

Posted: 02 Jul 2020, 08:01
by IanM
We have a few buttons in our application like
<Button x:Name="MenuButton" Content="Menu" Command="{Binding MenuCommand}" />
Is there a way to make a button trigger its command (MenuCommand) on key down rather than key up?

Re: Triggering button command on key down

Posted: 02 Jul 2020, 12:27
by sfernandez
Yes, you just need to change Button's ClickMode="Press".
Commands are executed after Button generates the Click event.