How to Close the ChildWindow from the context viewmodel?

Topics: Prism v4 - WPF 4
Feb 2, 2012 at 7:10 AM

Click a button in UserView will invoke a method in UserViewModel 

     private void OnLinkExcuted()
            var view = ServiceLocator.Current.GetInstance(typeof(RoleSelectListView), "RoleSelectListView");
            this.shellViewModel.ConfirmExitInteractionRequest.Raise(new Confirmation(){Content=view, Title="Role"});

the view RoleSelectListView 's DataContext is RoleSelectListViewModel.

The RoleSelectListView have a ListView to represent all roles, double click some item. invoke the method  OnDoubleClickExcuted()  in RoleSelectListViewModel .

my problems are:

1. how to close the ChildWindow in OnDoubleClickExcuted() ?

2. how to return the selectedItem ?

Feb 2, 2012 at 8:47 AM
Edited Feb 2, 2012 at 4:38 PM

I solved, reference sample "State-Based Navigation".