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

DXExpander.GetExpandCollapseInfo Event

Allows you to manually specify the DXExpander content size in the expanded state.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v20.2.dll


public event ExpandCollapseInfoEventHandler GetExpandCollapseInfo

Event Data

The GetExpandCollapseInfo event's data class is ExpandCollapseInfoEventArgs. The following properties provide information specific to this event:

Property Description
Expander Gets or sets the expander control that raised the event.
Size Gets or sets the DXExpander content size in the expanded state.


The GetExpandCollapseInfo event fires when DXExpander is expanded or collapsed with the DXExpander.StretchChild property set to true (indicates that the control stretches its content when expanded). Use the event parameter’s ExpandCollapseInfoEventArgs.Size property to specify the DXExpander content size.

Note that if the vertical animation is disabled (specified by the DXExpander.VerticalExpand property set to VerticalExpandMode.None), the Height component is ignored, and the height is defined by the expander content. Similarly, the Width component is ignored if the horizontal animation is disabled (the DXExpander.HorizontalExpand property is set to HorizontalExpandMode.None).

If the DXExpander.StretchChild property is set to false, indicating that the content slides when the control is expanded/collapsed, the GetExpandCollapseInfo event is not fired, and the content size is defined by the content.

See Also