I have been using the MVVM light toolkit in my WPF applications for some time now and I often encounter a similar problem when designing the ViewModelLocator. I am never sure which view-models should be exposed through the locator. Let me explain my question with an example.
I have an application which has only one window. The window always shows exactly one page(Page is a user control). The window contains only the selected page and nothing else. There are three pages defined in the application. The StartPage, MainPage and the FinishPage. The content of the start and finish pages is mostly static. The MainPage contains one or more subpages(which subpages are contained within the MainPage is specified in an external XML file), but at any given time at most one subpage is visible. Each page and each subpage has it's own view-model. So which view-models should be accessible through the locator? Should the locator contain only the property for the MainViewModel(view-model for the window) or also the page view-models or maybe even view-models for the subpages?
I hope my question is understandable. If I failed to explain my question please let me know so I can provide additional information. Any thoughts on the subject will be appreciated