XRLabel.TextFitMode Property
Specifies how text is resized to fit a control. This property has limitations when working with other properties.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
[DefaultValue(TextFitMode.None)]
[SRCategory(ReportStringId.CatBehavior)]
public virtual TextFitMode TextFitMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
TextFitMode | None | A TextFitMode enumeration value. |
Remarks
You can use the TextFitMode
property to adjust the text font size to fit the control area.
The XRControl.Text property specifies control text.
The list below catalogs available modes and (their result for labels with different content-don’t know what this means).
None
Text size remains unchanged.
GrowOnly
Text size is automatically increased to occupy the entire area of the control. This text size value is unavailable when the CanShrink is
true
.ShrinkOnly
Text size is automatically reduced to display the entire text in the control. This value is unavailable when the CanGrow is
true
.ShrinkAndGrow
Text size can be automatically decreased or increased to fit control boundaries. This value is available only when both CanShrink and CanGrow properties are
false
.
Note
The TextFitMode
value does not automatically adjust to a valid value if you modify the CanGrow
or CanShrink
property. In case TextFitMode
is set to an invalid value for the current scenario, its value is ignored at runtime.
Limitations
The TextFitMode
property is disabled and not in effect in the following cases:
- The XRLabel.AutoWidth option is enabled.
- The XRLabel.Angle property is specified (not equal to
0
). - The XRControl.AnchorHorizontal or XRControl.AnchorVertical property is set to
Both
.