title: Bind window closing event to an ICommand
body: <p>I have a simple WPF application where I don't have any mvvm framework like mvvmlight. Is there as way to bind a window close event to an ICommand that's in the view model?</p>
  
  <p>I tried something like </p>
  
  <pre><code>&lt;Window.CommandBindings&gt;
      &lt;CommandBinding Command="Close" Executed="{Binding WindowClose}" /&gt;
  &lt;/Window.CommandBindings&gt;
  </code></pre>
  
  <p>but obviously it doesn't work because it's looking for an event handler. Is there a simple way to do this?</p>