Open child window from main view-model

Mar 13, 2015 at 9:29 AM
the task I want to do is to be able to open, hide and show a child window from main window's view-model

For this purpose I can use the following tool inside my MainWindowViewModel
bool Show(string key, object state, bool setOwner, EventHandler<UICompletedEventArgs> completedProc);
But this method accepts a view-model as its object state parameter and I need the View-Model to be resolved with MEF, also because there's an IViewAwareStatus import in child's view-model

Whether it is possible not to create a new instance of child window's view-model and expect it will be resolved since I decorated it with
and the following inside ChildWindow.xaml
May 13, 2016 at 7:04 PM
Try this:
[PopupNameToViewLookupKeyMetadata("ChildWindowViewModel", typeof(ChildWindowView))] 
as Attribute over the class of you child window instead of the ViewModelLocator.