IanM
Topic Author
Posts: 7
Joined: 14 Feb 2020, 07:10

Triggering button command on key down

02 Jul 2020, 08:01

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?
 
User avatar
sfernandez
Site Admin
Posts: 3005
Joined: 22 Dec 2011, 19:20

Re: Triggering button command on key down

02 Jul 2020, 12:27

Yes, you just need to change Button's ClickMode="Press".
Commands are executed after Button generates the Click event.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 4 guests