简体   繁体   中英

c# -> WPF -> Alt+Shortcut works, Shortcut on its own works, Alt followed by shortcut does not

In c# applications using WPF , including a very simple one with 1 button, I have several shortcut keys. They all behave in the following manner

Alt+Shortcut key pressed at the same time works, Shortcut key on its own works (not what I was expecting without showing the underscore unless it is shown already). Alt followed by short cut key goes beep and does not work, presumably reporting some error.

What is going on here? How can I get consistent behaviour. In WinForms it used to be just Alt+Shortkey that worked. That is what I would like unless the standard behaviour has changed.

thanks

But that is how it works
Alt + key is how you execute the short cut
Alt alone just turns the shortcut indicator on and off

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM