Skip to main content

IBaseViewController.Close(BaseDocument) Method

Closes and destroys the specified document and its contents.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

bool Close(
    BaseDocument document
)

Parameters

Name Type Description
document BaseDocument

A BaseDocument object to be closed.

Returns

Type Description
Boolean

true if the document has been closed and destroyed; otherwise, false.

Remarks

An end-user can close a document by clicking a close (‘x’) button. The Close method allows you to close a document in code.

When a document is closed, it and its contents are destroyed. To temporarily hide a document, use the BaseView.RemoveDocument or IBaseViewController.RemoveDocument method.

To prevent a document from being closed, handle the BaseView.DocumentClosing event or use the IBaseDocumentDefaultProperties.AllowClose/IBaseDocumentProperties.AllowClose properties.

See Also