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

后端 未结 3 1232
清酒与你
清酒与你 2021-01-18 14:22

I want to implement Keyboard shortcuts for a MenuItem. I have used the code below:



        
3条回答
  •  情歌与酒
    2021-01-18 15:02

    It is quite explicit in the documentation for the property:

    This property does not associate the input gesture with the menu item; it simply adds text to the menu item. The application must handle the user's input to carry out the action. For information on how to associate a command with a menu item, see Command.

提交回复
热议问题