I am practicing building applications using MVVM and WPF+C# by making a "finance application".
The application contains several views with their own ViewModels. The views are in a hierarchy and are defined as UserControl
with their ViewModel specified in XAML.
One main model contains different financial information that would be presented in views in different ways.
What technique should I use to make sure all ViewModels have access to the main model?
I can come up with three ways:
1. Using a static class which all ViewModels can use.
2. Using MEF with Shared Creation Policy to use a Singleton model that the ViewModels get when they are created.
3. Have each ViewModel have a property for the main model and let parent ViewModels propagate it down the chain.
What solution is recommended for MVVM?