Skip to main content
.NET Framework 4.5.2+

View.Close(Boolean) Method

Closes a View if it is allowed to be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.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 was closed successfully; otherwise, false.

Remarks

Use this method to close a View. Pass true if you need to raise the View.QueryCanClose event. The Close method does not close the View if the View.QueryCanClose event handler sets the CancelEventArgs.Cancel parameter to true.

Note

XAF does not trigger the QueryCanClose event in ASP.NET Core Blazor applications. Use the DevExpress.ExpressApp.Blazor.BlazorWindow.Closing event to prohibit closing a View under certain conditions.

If a View can 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