I'm looking into the concept of ViewModelLocators, but found only basic tutorials that were dealing with one main View and one main ViewModel, which of course works fine.
While I do understand how the concept of the ViewModelLocator itself works, I do not really understand how navigation would work with this. I am used to use DataTemplates in Views that react to a bound ViewModel - when the bound ViewModel changes then a different view is shown. How would that be done with a ViewModelLocator? I was not able to find a nice tutorial example that deals with the question of navigation.
Could anyone of you provide me a tutorial how this is supossed work? I somehow fail to understand this on my own.
A view model locator is not responsible for the navigation.
You would use a navigation service to navigate between the views from which the view models are resolved using the view model locator.
The navigation service and the view model locator are two different components with different responsibilities.
You will find a brief example of how to use them both together here.