Skip to main content

DockLayoutManager.ClosingBehavior Property

Gets or sets the way in which a panel is closed.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

public ClosingBehavior ClosingBehavior { get; set; }

Property Value

Type Description
ClosingBehavior

A ClosingBehavior value that specifies how a panel is closed.

Available values:

Name Description
Default

When applied to a DockLayoutManager via the DockLayoutManager.ClosingBehavior property, acts as the ClosingBehavior.HideToClosedPanelsCollection option.

When applied to a BaseLayoutItem via the BaseLayoutItem.ClosingBehavior property, gets a ClosingBehavior enumeration value of its parent DockLayoutManager .

HideToClosedPanelsCollection

When a panel is closed, it’s hidden and moved to the DockLayoutManager.ClosedPanels collection. The panel can be accessed via the Closed Panels bar (see DockLayoutManager.ClosedPanelsBarVisibility).

ImmediatelyRemove

When a panel is closed, it’s hidden. No reference to the closed panel is kept.

Remarks

A panel can be closed in code via the DockControllerBase.Close method, and by an end-user, by clicking the panel’s close button. In both cases, the panel closing behavior is affected by the ClosingBehavior and BaseLayoutItem.ClosingBehavior properties.

Closing a panel removes it from view. If the DockLayoutManager.ClosingBehavior property is set to Default or ClosingBehavior.HideToClosedPanelsCollection, the closed panel is hidden, and moved to the DockLayoutManager.ClosedPanels collection internally. If the DockLayoutManager.ClosingBehavior property is set to ClosingBehavior.ImmediatelyRemove, the panel is hidden, and no reference to this panel is kept by the Dock Layout Manager.

You can override the closing behavior for individual panels via the BaseLayoutItem.ClosingBehavior property. The ClosingBehavior property determines a panel’s closing behavior only if the BaseLayoutItem.ClosingBehavior is set to Default.

See Also