Background:
I am dealing with WPF solution that doesn't have good separation in accordance MVVM pattern. I need to improve architecture, readability, etc.
My current issue is that I have MainVM with a huge amount of dependencies. MainVM corresponds to MainWindow view. MainVM is created on startup and holds as properties all other ViewModels of application. This MainVM is passed to all calls of Commands (ones who implement ICommand) and if some functionality needs its own ViewModel it references MainVM and reads a related property that holds needed ViewModel.
Another issue is ViewModels are not separated from Models.
My idea is to create a 'storage' for ViewModels (ideally Models but it is hard to achieve separation at this point) and access needed ViewModels from this storage and not from MainVM.
My application doesn't store anything, so the lifetime of this ViewModels storage will be the same as the lifetime of the application (static).
Now to my questions (rephrased):
1 - Is it common practice to access ViewModels from one 'main' ViewModel?
2 - What are possible drawbacks of using a separated storage for ViewModels and then Models in a WPF app?
3 - Should Commands (ones who implement ICommand) be dependent on ViewModels?
Rephrased question:
1 - Where to store ViewModels in WPF app?
2 - Is it possible to use Repository pattern to store Models in WPF?
3 - No modifications