I am developing a view-based application using the MVVM-Light framework (C#). Essentially, I have a single window that opens with a content controller, and the view models determine which view is in the content controller.
I would like to run commands from each individual view model that changes the view. For instance, if the user were to press "Submit", the application would take them back to the main view.
The only thing I can think of is to have each view model require a ParentWindow argument of type Window
in order to link back to the CurrentViewModel
variable in my MainWindowViewModel
. Is there a better way to do this?