The requested page is not available for the requested platform. You are viewing the content for Default platform.

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

Declaration

[Browsable(true)]
public override bool CanShrink { get; set; }
<Browsable(True)>
Public Overrides Property CanShrink As Boolean

Property Value

Type Description
Boolean

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

Remarks

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.

Note

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.

Note

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

Note

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

Note

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