I'm using MVVM in a WPF application. I want the least possible code to exist in the view's code behind. All Views and ViewModels are registered in dependency injection engine and my Views have dependencies to their ViewModel (injected via constructor).
In one of the command handlers of ViewModel "A", I need to show View "B". What's the best approach to create the second view? I can resolve it via Constructor of ViewModel "A", and display it in the command handler, or resolve it with Service Locator when the command is being executed.