Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SplitContainerControl.CollapsePanel Property

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.2.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.

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