title: Using MVVM in WPF, should I launch child windows from View code behind, or ViewModel?
body: <p>I've been puzzled by this for a while. I am writing quite a large <code>RibbonWindow</code> WPF application using the MVVM pattern. The screen has a <code>RibbonBar</code> menu along the top and the rest of it displays the various Views. Some Views contain other Views and some of these have buttons that launch child Windows.</p>
  
  <p>So far, I have been doing this from the View code behind file, but I'm aware that these files are supposed to be empty when using MVVM. I could move the child window launch code to the ViewModel, but then I would need a reference to the main <code>RibbonWindow</code> (to set as the child window owner) and that doesn't seem right.</p>
  
  <p>Any advice or tips on how this is normally achieved using MVVM would be greatly appreciated. </p>