title: Creating an MVVM friendly dialog strategy
body: <p>I'm trying to create a strategy for handling popup forms for use throughout any part of my application. My understanding so far is that I will need a single <code>UserControl</code> in the root of my MainWindow. This will be bound to its own ViewModel which will handle the messages that are sent within the app. </p>
  
  <p>I'm using MVVM Light, and I'm fairly new to the <code>Messenger</code> class.</p>
  
  <p>Imagine a Master/Details scenario, where a list a objects are contained within a <code>ListBox</code>. Selecting one of these items and clicking an Edit button would display a <code>UserControl</code> which covers the whole screen. The user can then edit the selected item, and click OK to commit the change.</p>
  
  <p>I want the <code>UserControl</code> that is opened to be "generic" in a way that I can throw any (probably a ViewModel) at it... for it to render the ViewModel via a <code>DataTemplate</code> and handle all the object changes. Clicking OK will callback to the sending class and persist the change as before.</p>
  
  <p>Some situations where this would be useful are...</p>
  
  <ol>
  <li>Display error messages with no required user input (other than OK to close it)</li>
  <li>Display an edit form for a data item</li>
  <li>Confirmation dialogs (much like a standard MessageBox)</li>
  </ol>
  
  <p>Can anyone provide any code samples of how I might acheive this?</p>