Create a custom RoutedCommand, the CommandBinding objects, and the KeyBinding objects in code.