Skip to main content

DockControllerBase.Close(BaseLayoutItem) Method

Closes the specified item.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

public 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

Closing a panel removes it from view. 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.

Alternatively, you can set the BaseLayoutItem.Closed property to true to close this item.

Panels that are stored in the DockLayoutManager.ClosedPanels collection can be accessed by an end-user via the Closed Panels bar. See DockLayoutManager.ClosedPanelsBarVisibility to learn more.

To create a hidden panel, define a panel object and manually add it to the DockLayoutManager.ClosedPanels collection.

An item cannot be closed if the BaseLayoutItem.AllowClose option is disabled.

To set a command to be executed when the item is closed, use the BaseLayoutItem.CloseCommand.

See Also