Back to Devexpress

XRLabel.CanShrink Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrlabel-0ccd9a3a.md

latest3.7 KB
Original Source

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.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

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

Property Value

TypeDescription
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.

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.

See Also

CanGrow

XRLabel Class

XRLabel Members

DevExpress.XtraReports.UI Namespace