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

IDockController.CloseAllButThis(BaseLayoutItem) Method

Closes all items except the specified one within this item’s container.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.dll

NuGet Package: DevExpress.Wpf.Docking

#Declaration

bool CloseAllButThis(
    BaseLayoutItem item
)

#Parameters

Name Type Description
item BaseLayoutItem

The only BaseLayoutItem element to remain opened within its parent container.

#Returns

Type Description
Boolean

true, if all but the specified items were successfully closed; otherwise, false.

#Remarks

The CloseAllButThis or Close methods close the items whose BaseLayoutItem.AllowClose property is set to true.

The method closes all child items within the item’s container except the specified item object.

You can set a closed item’s BaseLayoutItem.ClosingBehavior or a parent dock layout manager’s DockLayoutManager.ClosingBehavior properties to specify whether items should be removed, or moved to the closed panel collection.

Tip

Use the DockControllerBase.Close method to close a specific item.

See Also