Skip to main content
.NET 6.0+

View.Close(Boolean) Method

Closes a View if it is allowed to be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v23.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public bool Close(
    bool checkCanClose
)

Parameters

Name Type Description
checkCanClose Boolean

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

Returns

Type Description
Boolean

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

Remarks

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