.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

View.Close(Boolean) Method

Closes a View if it is allowed to be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v21.2.dll


public bool Close(
    bool checkCanClose


Name Type Description
checkCanClose Boolean

true if the View.QueryCanClose event should be raised; otherwise, false.


Type Description

true if a View has been closed successfully; otherwise, false.


Use this method to close a View. Pass true, if you require the View.QueryCanClose event to occur. This event is intended for prohibiting closing a View. So, the Close method will not close the View if the View.QueryCanClose event is handled and the handler’s CancelEventArgs.Cancel parameter returns true.

If a View is allowed to be closed, the Close method raises the View.Closing and View.Closed events.

This method is used internally with the parameter set to true.

See Also