[ACCEPTED]-How to override onclose event on WPF?-wpf
Accepted answer
The application never closes because you 1 are setting e.Cancel
to true
.
Try
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
//do my stuff before closing
base.OnClosing(e);
}
You are asking it not to close by setting 1 e.Cancel = true
. Just don't do that.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.