If you are keeping your view models in the same assembly as your views, one trick I have used to help organize views with view models in addition to a simple naming scheme like {View Name}ViewModel for the view model class is to do the following:
- Create your view class (Shell.xaml)
- In the same location, add your view
model class (ShellViewModel.cs)
- Rename the view model class file to
be the same name as the view, but
append .model to the file path
(Shell.model.cs)
- Edit the project file (either
manually or using the power command
extensions in VS)
- Locate the Compile element for
the view model class in the project
XML document
- Add a child DependentUpon element
whose content is the name of the
view class
- Save changes and reload the project
This will cause the view model class to be visually grouped along side the code-behind file for the view.