>WPF and shortcuts


Forcing the user to sprout a third arm to use a mouse is considered bad programming.

All menus should have shortcuts.  To be frank almost all controls should have shortcuts.  To use a few seconds to add shortcuts to the controls as they are made is considered good.

Shortcuts in WPF is done by prefixing with underscore, like E_xit and _Open. (WinForm is done by prefixing with ampersand, like E&xit.  Web applications should have this too and there it is called Accesskey.

Then to add the nice “Ctrl-O” text beside Open and “Ctrl-S” beside Save is trickier in WPF.  By no special order these are the pages I had to read to understand CommandBinding and RoutedUICommand:

Leave a Reply