Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

View.Close(Boolean) Method

Closes a View if it is allowed to be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.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 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