title: How do you tell if a WPF Window is closed?
body: <p>I'm working on an application that displays some child windows which can either be closed by the user or are automatically closed.  While debugging some exceptions that were being thrown, I discovered I was trying to call methods like <code>Hide()</code> on a window that had already been closed; this particular branch of code was common to both cases and I hadn't noticed this.</p>
  
  <p>One of my first ideas was to look for a property on <code>Window</code> that would indicate the window had been closed.  I can't seem to find one.  In WinForms, I'd look to the <em>IsDisposed</em> property for a somewhat reliable indicator that the form had been closed (it won't reliably work for a dialog but I'm not working with dialogs.)  I don't see anything equivalent on <code>Window</code>.  The documentation for <code>Window.Close()</code> doesn't seem to indicate any properties that are changed by the method.  Am I missing something obvious, or is the only method to know if a window's been closed to handle the <code>Closed</code> event?  That seems kind of a harsh requirement for a simple task.</p>