Assign Short Cut Key to a button in WPF

前端 未结 5 901
梦毁少年i
梦毁少年i 2020-12-03 05:15

How to assign short-cut key to a button in WPF?

Googling gave me the answer as to append _ instead of \'&\' in standard Winforms.

So after I have done a

5条回答
  •  佛祖请我去吃肉
    2020-12-03 05:24

    To bind keyboard gestures, you need to use the KeyGestures with commands. Check out commands for more information on this. Also there are loads of predefined commands which can directly be used in your application (like, Cut, Copy, Paste, Help, Properties, etc.,).

提交回复
热议问题