Skip to main content
A newer version of this page is available. .

XRControl.TextAlignment Property

Specifies the alignment of the control’s text.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Reporting.Core

Declaration

[SRCategory(ReportStringId.CatAppearance)]
public virtual TextAlignment TextAlignment { get; set; }

Property Value

Type Description
TextAlignment

A TextAlignment enumeration value that specifies how the text is aligned within the control.

Available values:

Show 12 items
Name Description
TopLeft

The text is vertically aligned at the top, and horizontally aligned on the left.

TopCenter

The text is vertically aligned at the top, and horizontally aligned at the center.

TopRight

The text is vertically aligned at the top, and horizontally aligned on the right.

MiddleLeft

The text is vertically aligned in the middle, and horizontally aligned on the left.

MiddleCenter

The text is vertically aligned in the middle, and horizontally aligned at the center.

MiddleRight

The text is vertically aligned in the middle, and horizontally aligned on the right.

BottomLeft

The text is vertically aligned at the bottom, and horizontally aligned on the left.

BottomCenter

The text is vertically aligned at the bottom, and horizontally aligned at the center.

BottomRight

The text is vertically aligned at the bottom, and horizontally aligned on the right.

TopJustify

The text is vertically aligned at the top, and horizontally justified.

This mode is ignored in Silverlight applications.

MiddleJustify

The text is vertically aligned in the middle, and horizontally justified.

This mode is ignored in Silverlight applications.

BottomJustify

The text is vertically aligned at the bottom, and horizontally justified.

This mode is ignored in Silverlight applications.

Remarks

The TextAlignment property specifies the alignment of a control’s XRControl.Text.

If the TextAlignment property’s value is not set for the current report control, its value is obtained from its parent, or a parent of its parent and so on. Similarly, the TextAlignment value of the current control is applied to all its child report controls (if there are any in its XRControl.Controls collection), if their TextAlignment property value is not set. For more information on this concept, please refer to Appearance Properties.

The TextAlignment property is not used by all descendants of the XRControl class. (For example, this property is not available for the XRPageBreak class.)

The horizontal alignment, specified by the TextAlignment property, is ignored, when the XRLabel.AutoWidth property of a label is set to true.

The following code snippets (auto-collected from DevExpress Examples) contain references to the TextAlignment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also