Best way to rename MainWindow
c#, visual-studio, visual-studio-2010, wpf, xaml
Solution
- Get ReSharper
- Use Rename
- ????
- Profit
Problem
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 `StartupUri` in `App.xaml` accordingly. Is there a better way? :-)