Method Close
Close(WindowCloseAction?)
Closes the window.
public virtual void Close(WindowCloseAction? action)
Parameters
action
WindowCloseAction?
Remarks
When a window is closed, all resources created within the object are closed and the
window is disposed.
You can prevent the closing of a window at run time by handling the
Closing event and
setting the Cancel
property of the CancelEventArgs passed as
a parameter to your event handler.
If the window you are closing is the last open window of your application,
your application ends.
The window is not disposed on close when you have displayed the
window as a modal dialog.
In this case, you will need to dispose it manually.
Close()
Closes the window.
public virtual void Close()
Remarks
When a window is closed, all resources created within the object are closed and the
window is disposed.
You can prevent the closing of a window at run time by handling the
Closing event and
setting the Cancel
property of the CancelEventArgs passed as
a parameter to your event handler.
If the window you are closing is the last open window of your application,
your application ends.
The window is not disposed on close when you have displayed the
window as a modal dialog.
In this case, you will need to dispose it manually.