Issue:
When you create an enterprise application, Keyboard shortcuts are a must. Enterprise applications will need keyboard shortcuts to execute certain actions in controls which are possible only by using mouse. Keyboard shortcut is different from keyboard access key where it will help you to get the focus on to control. Here we will use InputBindings to achieve this. InputBindings represents a binding between an input gesture and a command.
How did I fix it:
Here in this example, we will try to add a custom command handler to handle the input gesture ctrl+Del which we will bind to DeleteCommandHandler command. Now the DeleteCommandHandler command will get executed when user uses ctrl+Del.
When you create an enterprise application, Keyboard shortcuts are a must. Enterprise applications will need keyboard shortcuts to execute certain actions in controls which are possible only by using mouse. Keyboard shortcut is different from keyboard access key where it will help you to get the focus on to control. Here we will use InputBindings to achieve this. InputBindings represents a binding between an input gesture and a command.
How did I fix it:
Here in this example, we will try to add a custom command handler to handle the input gesture ctrl+Del which we will bind to DeleteCommandHandler command. Now the DeleteCommandHandler command will get executed when user uses ctrl+Del.
<UserControl.InputBindings> <KeyBinding Command="{Binding CancelButtonCommand}" Key="Escape" Modifiers="Control" /> </UserControl.InputBindings>
0 comments:
Post a Comment
Dear reader, Your comment is always appreciated. I will reply to your queries as soon as possible.
1. Make sure to click on the Subscribe By Email link to be notified of follow up comments and replies. Or you can use Subscribe to: Post Comments (Atom) link.
2. Only English comments shall be approved.
3. Please make your comments self-explanatory. Comment in such a way that it explains the comment so that a counter question can be avoided and can be replied with proper answer on the first go.