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.CloseAllButThis(BaseDocument) Method

Closes all documents except the specified document.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

bool CloseAllButThis(
    BaseDocument document
)

#Parameters

Name Type Description
document BaseDocument

A BaseDocument that must not be destroyed.

#Returns

Type Description
Boolean

true if the method was successfully completed; otherwise, false.

#Remarks

The CloseAllButThis method calls the IBaseViewController.Close method for all documents in a View except the specified document.

The IBaseDocumentDefaultProperties.AllowClose and IBaseDocumentProperties.AllowClose options let you prevent specific documents from being closed.

The ITabbedViewController.CloseAllButPinned method, available in TabbedView only, closes all Documents except for pinned ones.

See Also