Back to Devexpress

IDockController.Close(BaseLayoutItem) Method

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

latest2.4 KB
Original Source

IDockController.Close(BaseLayoutItem) Method

Closes the specified item.

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

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

Parameters

NameTypeDescription
itemBaseLayoutItem

A BaseLayoutItem object to be closed.

|

Returns

TypeDescription
Boolean

true, if the item is successfully closed; otherwise, false.

|

Remarks

After a panel is closed, it can either be completely removed, or stored in the DockLayoutManager.ClosedPanels collection. This depends on the BaseLayoutItem.ClosingBehavior and DockLayoutManager.ClosingBehavior property values. An item’s close behavior setting overrides a dock layout manager’s close behavior setting.

You can also set the BaseLayoutItem.Closed property to true to close the item.

An end user can access the DockLayoutManager.ClosedPanels collection with the Closed Panels bar.

Note

You cannot close an item if the BaseLayoutItem.AllowClose property is false.

Use the BaseLayoutItem.CloseCommand to specify a command that should be executed when the item is closed.

See Also

IDockController Interface

IDockController Members

DevExpress.Xpf.Docking Namespace