The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

View.CanClose() Method

Determines whether a View can be closed.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public bool CanClose()
Public Function CanClose As Boolean
public bool CanClose()
Public Function CanClose As Boolean
public bool CanClose()
Public Function CanClose As Boolean

Returns

Type Description
Boolean

true if the current View can be closed; otherwise, false.

Returns

Type Description
Boolean

true if the current View can be closed; otherwise, false.

Returns

Type Description
Boolean

true if the current View can be closed; otherwise, false.

Remarks

Use this method to check whether a View is allowed to be closed. If the current View is not root (it is created in another View's Object Space), this method returns true. Otherwise, it raises the View.QueryCanClose event and returns the opposite value of the handler's CancelEventArgs.Cancel parameter. Handle this event to prohibit closing a View under specific conditions.

This method is used internally, when closing a Window in a Windows Forms application and when replacing a View with another.

See Also