How can I set key commands like if the user presses Ctrl + Shift + N, a new dialog or action happens. And do I have to make a new event for each key command? How can I do this.
A:
You can use the command framework provided for WPF. Some basic commands such as paste, copy, open, etc. are already defined by Microsoft...
You can, however, define new commands. A command can be executed when a button is clicked, a keyboard shortcut is pressed, a menu item is selected, etc.
I am no WPF guru, but my understanding is that using commands is the way to go.
Take a loot at MSDN: http://msdn.microsoft.com/en-us/library/ms752308.aspx
Kevin
2010-01-22 01:48:53
+6
A:
You'll want to use the KeyBinding class.
KeyBinding allows you to bind a keyboard combination to any ICommand, including a RoutedCommand.
Reed Copsey
2010-01-22 01:51:13