I\'m a bit beginner in WPF, so I ask this..
Let\'s say I have a window, and inside the window I want to have something like container, could be just border or maybe
I solved this with a ContentControl
MainWindow: (Define the views you wish to visualize as resources)
ViewModel: (can't get much simpler)
public ViewModelBase CurrentView
{
get { return currentView; }
set { Set(() => CurrentView, ref currentView, value); }
}
And there you go, you can change your views by setting the view model for the controls you defined in your MainWindow
private void OnCommandExecuted()
{
CurrentView = someViewModel;
}
private void OnAnotherCommandExecuted()
{
CurrentView = anotherViewModel;
}
HTH!