Reputation: 4885
I have tried to read many posts on StackOverflow about how to implement the KeyBinding like Visual Studio Ctrl+Shift+ A or Ctrl+K,Ctrl+C but no luck
I have found this article on on blogspot regarding Multiple Keybinding but it makes multiple gesture like Ctrl + A,B
Is it possible to make a Keybinding that flexible like (VS Studio) through XAML Syantax.
Upvotes: 4
Views: 1989
Reputation: 144
<KeyBinding x:Name="mykeybinding" Gesture="CTRL+E" Key="P"
Command="commandname"/>
Seems to be working ok for me you have to press ctrl+E+P to execute command.
Based on http://msdn.microsoft.com/en-in/library/system.windows.input.keybinding.aspx
Upvotes: 0
Reputation: 2268
Sequence key combo's like VS has are not natively part of WPF and most other UI frameworks. The reason being that such combos hail from text editors of the Jurassic era and survive only in a few modern contexts where users of said era still survive and even thrive. ;-)
You should be able to provide your own handling mechanisms for this in a fairly straight forward manner:
Ideally you'll associate these combos command so there is no disparity between singles and combos.
Upvotes: 3