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.Close(BaseLayoutItem) Method

Closes the specified item.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.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