Assign Short Cut Key to a button in WPF

This is kind of old, but I ran into the same issue today.
I found that the simplest solution is to just use an AccessText element for the button’s content.

<Button Command="{Binding SomeCommand}">
    <AccessText>_Help</AccessText>
</Button>

When you press the Alt key, the ‘H’ will be underlined on the button.
When you press the key combination Alt+H, the command that is bound to the button will be executed.

http://social.msdn.microsoft.com/Forums/vstudio/en-US/49c0e8e9-07ac-4371-b21c-3b30abf85e0b/button-hotkeys?forum=wpf

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)