title: Modal Popup and views communication under MVVM pattern on C#
body: <p>I have a large project coded with VB6 which I've been trying to upgrade to new technologies for a few months. My project consist on 6 administrative modules reunited under a client-server application. Coming from VB, my logical choice was to upgrade to .NET. After a lot of research I decide to use <code>C#</code>, <code>WPF</code> and the MVVM pattern (with Caliburn Micro). </p>
  
  <p>At the beggining I had some problems, but I managed to resolve them. But now I've come to a point where I need (like every complex application) to communicate with different views and their corresponding viewModel through modal popups (or some other technique). And in this matter the MVVM pattern seems to be very restrictive or complex. A simple "Are you sure you want to delete this record (yes/no)" is a very complex task. So I'm looking for advice as how communicate views without complex artifacts as EventAgregators. </p>
  
  <p>So far the only possible alternative I've found is to use the <code>ModalContentPresenter</code> class from <a href="http://programmingwithpassion.wordpress.com/2012/07/01/displaying-modal-content-in-wpf/" rel="nofollow">this blog</a>. The problems with this solution are:</p>
  
  <ul>
  <li>I need to write the father view XAML and modal XAML on the same view.</li>
  <li>I cannot have multiple popus from same view.</li>
  </ul>
  
  <p>Some examples of where I'd like to use modal popups is:</p>
  
  <ul>
  <li>Put a button on a view to select a Client. It should open a popup with all posible clients and let the user chose one.</li>
  <li>Add a product popup to a customer order.</li>
  </ul>
  
  <p>Any ideas or suggestions? Some sample code would be appreciated? Thanks!</p>