title: Excel closes when I close the main window in wpf
body: <p>I have a Excel AddIn project which parses excel workbook and pops a wpf window from excel ribbon when clicked on a button. the problem is that when I close the window (UI control of type window)pop up. closing action on Window closes the Excel too. </p>
  
  <p>the code is something like this to show the window.</p>
  
  <pre><code>MainWindow main= new MainWindow();
  main.ShowDialog();
  </code></pre>
  
  <p>can someone tell what's wrong here?</p>