Frictionless MVVM
10 steps project bootstrap (5 minutes)
I’m loving it:
- Create the Visual Studio solution;
- Add a WPF project;
- Add some nuget references:
- Radical;
- Radical.Windows;
- Radical.Windows.Presentation;
- Radical.Extensions.CastleWindsor;
- Add a reference to the new kid on the block (not yet on nuget): Radical.Windows.Presentation.CastleWindsor;
- Delete the default MainWindow.xaml;
- Edit the app.xaml file to remove the StartupUri property;
- Add a Presentation folder to the project;
- Create to new items:
- A WPF window MainView.xaml (*View is important for the default conventions);
- A class MainViewModel (<ViewName>ViewModel is important for the default conventions);
- In the app.xaml.cs add a single line of code:
- Press F5 and you are up & running :
The application boots, all the default and required services (for MVVM and UI Composition) are wired into Castle Windsor, the MainView is designed as the main window, at boot time the MainView is resolved and using the conventions engine the MainViewModel is wired as the DataContext of the MainView, in the end the MainView is shown.
.m