Occurs when closing a View.
The Closing event handler receives an argument of the EventArgs type.
This event occurs in the following cases:
- In a Windows Forms appliction, when a Window that contains the current View is closed.
- In any application, when the current View is replaced with another View.
To cancel closing of the current View, handle the View.QueryCanClose event and set the CancelEventArgs.Cancel parameter to true. By default, it is set to false.
To release additional resources used by the View which is going to be closed, handle the Closing event.