Skip to main content

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.

xrlabel-text-fit-mode-properties-window

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.

label-text-fit-mode-none

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.

label-text-fit-mode-grow-only

ShrinkOnly

Text size is automatically reduced to display the entire text in the control. This value is unavailable when the CanGrow is true.

label-text-fit-mode-shrink-only

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.

label-text-fit-mode-shrink-and-grow

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:

See Also