Skip to main content

IDockController.Close(BaseLayoutItem) Method

Closes the specified item.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

bool Close(
    BaseLayoutItem item
)

Parameters

Name Type Description
item BaseLayoutItem

A BaseLayoutItem object to be closed.

Returns

Type Description
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