title: M-V-VM Design Question. Calling View from ViewModel
body: <p>I've just started looking into M-V-VM for a WPF application.  Everything makes sense so far besides this particular issue...</p>
  
  <p>I have a ViewModel I'll call Search.  This ViewModel binds to a datagrid and lists results of items.  Now, I have a command that needs to bring up <strong>another view</strong>, the item's details.</p>
  
  <p>Putting the logic to show another view in the Search View doesn't seem right, it's not testable at all.</p>
  
  <p>Here is my ViewModel implementation, which is not testable...</p>
  
  <pre><code>public class SearchViewModel
  {
     public void SelectItem()
     {
       // I want to call the DetailsView from here
       // this seems wrong, and is untestable
       var detailsView = new DetailsView();
       detailsView.Show();
     }
  }
  </code></pre>
  
  <p><strong>Where does the logic to show a view from a ViewModel method go in this pattern?</strong></p>