title: How have you successfully implemented MessageBox.Show() functionality in MVVM?
body: <p>I've got a WPF application <strong>which calls MessageBox.Show() way back in the ViewModel</strong> (to check if the user really wants to delete). <em>This actually works</em>, but <strong>goes against the grain of MVVM</strong> since the ViewModel should not explicitly determine what happens on the View.</p>
  
  <p>So now I am thinking <strong>how can I best implement the MessageBox.Show() functionality</strong> in my MVVM application, options:</p>
  
  <ol>
  <li><p>I could have a message with the text "Are you sure...?" along with two buttons Yes and No all in a Border in my XAML, and create a trigger on the template so that it is collapsed/visible based on a ViewModelProperty called <strong>AreYourSureDialogueBoxIsVisible</strong>, and then when I need this dialogue box, assign AreYourSureDialogueBoxIsVisible to "true", and also handle the two buttons via DelegateCommand back in my ViewModel.</p></li>
  <li><p>I could also somehow try to handle this with triggers in XAML so that the Delete button actually just makes some Border element appear with the message and buttons in it, and the Yes button did the actually deleting. </p></li>
  </ol>
  
  <p><strong>Both solutions seem to be too complex</strong> for what used to be a couple lines of code with MessageBox.Show().</p>
  
  <p><strong>In what ways have you successfully implemented Dialogue Boxes in your MVVM applications?</strong></p>