In Visual Studio 2010, if I create a new project that is a WPF Application, the MainWindow subclass of Window is provided as a default first window. The steps I’ve been taking to rename MainWindow are:
- Use Solution Explorer to rename
MainWindow.xaml. - Rename the class in
MainWindow.xaml.cs. - Select the “Rename ‘MainWindow’ to …” option from the “Options to update references to the renamed object” popup menu which appears next to the renamed class.
- Update
StartupUriinApp.xamlaccordingly.
Is there a better way? 🙂
1 Answer