tags:

views:

224

answers:

3
+2  Q: 

Keybinding in WPF

+1  A: 

Have you tried setting the Key attribute to "LeftAlt" or "RightAlt"? The Key attribute is of type System.Windows.Input.Key enumeration, which doesn't have an "Alt" value.

Alt is used as a modifier in a KeyGesture, so that is why you see it separately in other places. However, in the Key enumeration, it specifically has instances for the left and right Alt keys.

You will more than likely have to have two bindings, one for each alt key.

casperOne
A: 

Try setting IsMainMenu="True" on your Menu control. Does that give you the behavior you're looking for?

John Bowen
A: 

The answer I was looking for can be found here:

http://www.stackoverflow.com/questions/1218394/how-can-i-toggle-the-main-menu-visibility-using-the-alt-key-in-wpf

Thanks to everyone for the help.

jamier