A newer version of this page is available. Switch to the current version.

DockLayoutManager.ClosingBehavior Property

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

Namespace: DevExpress.Xpf.Docking

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


public ClosingBehavior ClosingBehavior { get; set; }
Public Property ClosingBehavior As ClosingBehavior

Property Value

Type Description

A ClosingBehavior value that specifies how a panel is closed.


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