View.Close(Boolean) Method

Closes a View if it is allowed to be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.1.dll

Syntax

public bool Close(
    bool checkCanClose
)

Parameters

Type Name Description
Boolean checkCanClose

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.

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.