Below is what I tried to assign a shortcut for a menu item. When I click on menu item it works good but shortcut does not work. Any idea?
<Window.CommandBindings>
<CommandBinding Command="ApplicationCommands.Save" Executed="MyCommand" />
</Window.CommandBindings>
<Window.InputBindings>
<KeyBinding Key="S" Modifiers="Control" Command="ApplicationCommands.Save"/>
</Window.InputBindings>
<MenuItem Header="Save" Name="MainMenu_File_Save" Command="ApplicationCommands.Save">
<MenuItem.Icon>
<Image Height="16" Width="16" Source="/NewGUI_WPF;component/Images/saveHS.png" />
</MenuItem.Icon>
</MenuItem>
private void MyCommand(object sender, ExecutedRoutedEventArgs e) {...}