Before touching the designer or editing any xaml, it's useful to do to a quick build and some work on the code behind in the window's .xaml.cs file.
- Go to Build > Build Solution.
- Next declare the public static RoutedCommands required for this project in the .xaml.cs file. Open Window1.xaml.cs and add code similar to the following within the body of your Window1 class:
C# Copy Code public static RoutedCommand ExitCmd = new RoutedCommand(); public static RoutedCommand ZoomInCmd = new RoutedCommand(); public static RoutedCommand ZoomOutCmd = new RoutedCommand(); public static RoutedCommand Rotate90Cmd = new RoutedCommand(); public static RoutedCommand Rotate180Cmd = new RoutedCommand(); public static RoutedCommand Rotate270Cmd = new RoutedCommand();