Event Closing
Occurs before the window is closed.
event EventHandler<WindowClosingEventArgs>? Closing
Returns
- EventHandler<WindowClosingEventArgs>
- Occurs before the window is closed.
Remarks
The Closing event occurs as the window is being closed. When a
window is closed, it is disposed,
releasing all resources associated with the form. If you cancel this event, the
window remains opened.
To cancel the closure of a window, set the Cancel
property of the
WindowClosingEventArgs passed to your event handler to true
.