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

XRLabel.CanShrink Property

Gets or sets a value indicating whether the label’s height can decrease if its text does not completely fill the control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll


public override bool CanShrink { get; set; }

Property Value

Type Description

true if the label’s height can decrease in order to remove unused space; otherwise, false.


When the CanShrink property is set to true and the label’s text doesn’t completely fill the label, its height will be decreased to the height of its text. If there are other controls below the current label, they will be moved up to remove the unused space. Note that if a control overlaps the shrinking label by even one pixel, it will not be pushed up by the shrinking label.


If a label’s XRControl.AnchorVertical property is set to VerticalAnchorStyles.Bottom or VerticalAnchorStyles.Both, the XRLabel.CanGrow and CanShrink property values are ignored, and don’t participate in calculating a final height value of this control.


If a label participates in calculating a summary, its XRLabel.CanGrow and CanShrink property values are ignored.


The CanShrink property is ignored when the XRLabel.Angle property’s value is not 0.


If the CanShrink property is set to true and the XRControl.Text property is equal to Empty, a control’s contents are shrunk, but its borders (if there are any) remain visible.

If you want to completely hide the control (including its borders), set its XRControl.ProcessNullValues or XRControl.ProcessDuplicates property to ValueSuppressType.SuppressAndShrink.

See Also