View.Close(Boolean) Method
Closes a View if it is allowed to be closed.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v25.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| checkCanClose | Boolean |
|
Returns
| Type | Description |
|---|---|
| Boolean |
|
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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Close(Boolean) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.