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.v25.1.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
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 does not completely fill the label, its height will be decreased to the height of its text.
When using this feature, consider the following.
- If there are other controls below the current label, they are moved up to remove the unused space.
- 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
CanShrinkproperty values are ignored, and do not affect the final height calculation for this control. - If a label calculates a summary, its XRLabel.CanGrow and
CanShrinkproperty values are ignored. - The
CanShrinkproperty is ignored when the XRLabel.Angle property’s value is not0. - If the
CanShrinkproperty is set totrueand the XRControl.Text property is equal to Empty, control 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 ProcessNullValues or ProcessDuplicatesMode property to ValueSuppressType.SuppressAndShrink.
Report controls are converted to bricks in the printed document layout, and we cannot change the brick’s size after document creation. If you have an editable control, it is not possible to automatically change the control’s size according to new text in the printed document layout. The editable area cannot exceed the control’s original dimensions.