title: WPF Hide on Close?
body: <p>How do i do this in wpf</p>
  
  <p>VB.NET</p>
  
  <pre><code>   Private Sub FrmSettings_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
          e.Cancel = (e.CloseReason = Forms.CloseReason.UserClosing)
          Me.Hide()
      End Sub
  </code></pre>
  
  <p>c#</p>
  
  <pre><code>private void FrmSettings_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
  {
      e.Cancel = (e.CloseReason == Forms.CloseReason.UserClosing);
      this.Hide();
  }
  </code></pre>
  
  <p>as wpf's Close event just gives me e.Cancel and no closereason :(</p>