I am trying to implement an application with the MVVM Light Toolkit, but I am somehow stuck with the ViewModelLocator.
While it is clear to me how to access it from the views in XAML and code-behind of the views, I have some problems accessing it from other view models.
In App.xaml:
<Application.Resources>
<vm:ViewModelLocatorTemplate xmlns:vm="clr-namespace:MvvmLight1.ViewModel" x:Key="Locator" />
</Application.Resources>
In the View:
DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}"
But how to access for example the MainViewModel from some other view model? It seems previous releases of the ViewModelLocator snippets had a static method to the different view models. But those do not exist anymore, so I assume this was not the way to go. But what is? Or am I doing something completely against the pattern if I want to access the locator from a view model?