How do i do this in wpf
VB.NET
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
c#
private void FrmSettings_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
{
e.Cancel = (e.CloseReason == Forms.CloseReason.UserClosing);
this.Hide();
}
as wpf's Close event just gives me e.Cancel and no closereason :(