title: Taskkill.exe does not properly close WPF application
body: <p>We use <code>taskkill.exe</code> in some of our automation test teardowns, some of which involve having to close a WPF application.  </p>
  
  <p>I've discovered that if more than one window is open, taskkill will kill the active window but not the entire application.  We would prefer not to have to use the /F flag because that does not allow the application to close cleanly and leaves our database "dirty".  </p>
  
  <p>Has anybody run into this problem and found a solution, or have any ideas before we take a radically different approach? The closest I could find is setting <code>Application.Current.ShutdownMode</code> to <code>OnMainWindowClose</code>, but of course that doesn't help if the main window is not the front window when <code>taskkill</code> is executed.</p>