title: Add cofirmation message when ever user clicks on close button in WPF with MVVM
body: <p>In WPF with MVVM,how to add a confirmation message when a user clicks on close button. Everytime,it just closes the window without any confirmation message whereas the same thing is happening in windows form.</p>
  
  <p>In APP.XAML.CS</p>
  
  <pre><code>    public partial class App : Application
      {
          protected override void OnExit(ExitEventArgs e)
          {
              if (MessageBox.Show("Sure you wanna close?", "..", MessageBoxButton.YesNo) == MessageBoxResult.No)
                  e.ApplicationExitCode = 110;
              base.OnExit(e);
          }
      }
  </code></pre>
  
  <p>When i click on Close button it doesnt ask for confirmation just closes the window. </p>