Back to Devexpress

IBaseViewController.Close(BaseDocument) Method

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-ibaseviewcontroller-dot-close-x28-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-basedocument-x29.md

latest3.6 KB
Original Source

IBaseViewController.Close(BaseDocument) Method

Closes and destroys the specified document and its contents.

Namespace : DevExpress.XtraBars.Docking2010.Views

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
bool Close(
    BaseDocument document
)
vb
Function Close(
    document As BaseDocument
) As Boolean

Parameters

NameTypeDescription
documentBaseDocument

A BaseDocument object to be closed.

|

Returns

TypeDescription
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

CloseAllButThis(BaseDocument)

CloseAll()

IBaseDocumentDefaultProperties.AllowClose

IBaseDocumentProperties.AllowClose

ClosePageButtonShowMode

BaseView.RemoveDocument

IBaseViewController.RemoveDocument

IBaseViewController Interface

IBaseViewController Members

DevExpress.XtraBars.Docking2010.Views Namespace