Skip to main content

SplitContainerControl.CollapsePanel Property

Gets or sets the panel that is automatically collapsed when clicking on a splitter.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

[DefaultValue(SplitCollapsePanel.None)]
[DXCategory("Layout")]
[XtraSerializableProperty]
public virtual SplitCollapsePanel CollapsePanel { get; set; }

Property Value

Type Default Description
DevExpress.XtraEditors.SplitCollapsePanel None

A SplitCollapsePanel enumeration value that specifies the panel automatically collapsed when clicking on a splitter.

Remarks

To allow the first or second panel of the SplitContainerControl to be collapsed when clicking on a splitter, set the CollapsePanel property to SplitCollapsePanel.Panel1 or SplitCollapsePanel.Panel2. When a panel is collapsed, clicking on a splitter restores the panel to its original size.

The following image shows a SplitContainerControl with the CollapsePanel property set to SplitCollapsePanel.Panel2.

SplitContainerControl_CollapsePanel

To prevent a panel from being collapsed/restored, you can handle the SplitContainerControl.SplitGroupPanelCollapsing event and set the event’s Cancel parameter to true. To respond to collapsing/restoring a panel, handle the SplitContainerControl.SplitGroupPanelCollapsed event.

To collapse/expand the panel in code, use the SplitContainerControl.Collapsed property.

See Also