c# - Why doesn't setting MenuItem.InputGestureText cause the MenuItem to activate when I perform the input gesture? -


I want to apply a keyboard shortcut to MenuItem I have used the following code:

  & lt; MenuItem Header = "_New" InputJointType = "CTRL + N" Click = "NewMenu_click" & gt; & Lt; MenuItem.Icon & gt; & Lt; Image source = "images \ NEW.PNG" width = "25" height = "28" /> & Lt; /MenuItem.Icon> & Lt; / MenuItem & gt; `  

but InputGestureText is not responding to property when I pressed CTRL + N I used Visual Studio Express Edition 2010 I am doing Am I missing anything here?

It is quite clear documentation for properties:

This property The menu does not associate the input gesture with the item; This simply adds text to the menu item. For information about how to associate the command with the menu item, the user should handle the user's input to take action.

Comments