How can I ensure that only one KeyBinding command is executed when a keyboard shortcut is used?

I have the following KeyBindings:

<KeyBinding Gesture="Ctrl+S" Command="Save" />
<KeyBinding Gesture="Ctrl+Shift+S" Command="SaveAs" />

When I press Ctrl+Shift+S to execute the SaveAs command, it works -- but directly afterwards, the Save command is also executed. Is this caused by my Gesture definitions?


You have to mark the RoutedEvent as Handled=true using the RoutedEventArgs parameter in your method that handles the save.

Need Your Help

Understanding composite in java or GWT

java gwt composite

I have problem in understanding a composite.

Why interpreted langs are mostly ducktyped while compiled have strong typing?

compiler-construction programming-languages interpreted-language

I just don't know that, is there any technical reason for that? Is it more difficult to implement a compiler for a language with weak typing? What is it?