SplitContainerControl.CollapsePanel Property

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v20.1.dll


public virtual SplitCollapsePanel CollapsePanel { get; set; }
Public Overridable Property CollapsePanel As SplitCollapsePanel

Property Value

Type Default Description


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


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.


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