public static RoutedCommand myCommand = new RoutedCommand(); private void MyCommandExecuted(object sender, ExecutedEventArgs e) { MessageBox.Show("Test"); }
<UserControl.CommandBindings> <CommandBinding Command="var:UserControlName.myCommand" Executed="MyCommandExecuted"> </Usercontrol.CommandBindings> <USerControl.InputBindings> <KeyBinding Command="var:UserControlName.myCommand" Key="A"> </USerControl.InputBindings>
<UserControl Focusable="True">
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)