Windows are the typical top level controls in WPF. By default, a
MainWindow class is created by the application wizard and automatically shown upon running the application. In this recipe, we'll take a look at creating and showing other windows that may be required during the lifetime of an application.
Make sure Visual Studio is up and running.
We'll create a new class derived from
Window and show it when a button is clicked: