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 |
---|---|
Closing |
A Closing |
Available values:
Name | Description |
---|---|
Default | When applied to a Dock When applied to a Base |
Hide |
When a panel is closed, it’s hidden and moved to the Dock |
Immediately |
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.