If I understood correctly, you would like to create a particular instance of FrequencyEditVM and display it with the corresponding ViewModelBase that depends on selecting any menu option.
One possible way of selecting the proper ViewModel would be by using the container which may be retrieved from the IModule class constructor. Each menu option would have an associated command, so each one would call the constructor and navigation of FrequencyEditVM, passing the corresponding ViewModel as follows:
I hope this helped, Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky
One possible way of selecting the proper ViewModel would be by using the container which may be retrieved from the IModule class constructor. Each menu option would have an associated command, so each one would call the constructor and navigation of FrequencyEditVM, passing the corresponding ViewModel as follows:
Option1CommandHandler() { this.container.Resolve<ViewModel1>(); NavigateToWindow(viewModel); } Option2CommandHandler() ... NavigateToWindow(ViewModelBase viewModel) { // Create FrequencyEditVM instance passing Base viewModel through parameter.// Open window and display FrequencyEditVM's View. }
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky