XRLabel.TextFitMode Property
Specifies how the text is resized to fit the control. This property is not available if the Can Grow, Can Shrink, or Auto Width option is enabled.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v23.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 text is specified using the XRControl.Text property.
The table below demonstrates the available modes and their result for labels with different content.
Value | Description |
---|---|
None | The text size remains unchanged. |
GrowOnly | The text size is automatically increased to occupy the entire area of the control. |
ShrinkOnly | The text size is automatically reduced to display the entire text in the control. |
ShrinkAndGrow | The text size can be automatically decreased or increased to fit the control boundaries. |
The TextFitMode property is not in effect in the following situations:
- The XRControl.CanGrow, XRControl.CanShrink, or XRLabel.AutoWidth option is enabled.
- The XRLabel.Angle property is specified.
- The XRControl.AnchorHorizontal or XRControl.AnchorVertical property is set to
Both
.