Back to Devexpress

IDockController.CloseAllButThis(BaseLayoutItem) Method

wpf-devexpress-dot-xpf-dot-docking-dot-idockcontroller-dot-closeallbutthis-x28-devexpress-dot-xpf-dot-docking-dot-baselayoutitem-x29.md

latest2.3 KB
Original Source

IDockController.CloseAllButThis(BaseLayoutItem) Method

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

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
bool CloseAllButThis(
    BaseLayoutItem item
)
vb
Function CloseAllButThis(
    item As BaseLayoutItem
) As Boolean

Parameters

NameTypeDescription
itemBaseLayoutItem

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

|

Returns

TypeDescription
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

IDockController Interface

IDockController Members

DevExpress.Xpf.Docking Namespace