Skip to main content

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

IBaseViewController.Close(BaseDocument) Method

Closes and destroys the specified document and its contents.

Namespace: DevExpress.XtraBars.Docking2010.Views

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