Back to Devexpress

XRControlStyle.TextAlignment Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrcontrolstyle-6051c496.md

latest4.2 KB
Original Source

XRControlStyle.TextAlignment Property

Gets or sets the text alignment stored in this style.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[SRCategory(ReportStringId.CatAppearance)]
public override TextAlignment TextAlignment { get; set; }
vb
<SRCategory(ReportStringId.CatAppearance)>
Public Overrides Property TextAlignment As TextAlignment

Property Value

TypeDescription
TextAlignment

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

|

Available values:

Show 12 items

NameDescription
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 text alignment to be set to a control’s XRControl.TextAlignment property when the current style is applied to it. Note that if the TextAlignment property’s value is not set for the current XRControlStyle object, its value is treated as empty. This means that when a style is applied to a control, the control’s TextAlignment property value isn’t changed. For more information on this concept, please refer to Report Visual Styles.

Note

The TextAlignment property is not applicable to all report controls. For example, the XRPageBreak class ignores the TextAlignment property.

See Also

Appearance Properties

Report Visual Styles

Conditionally Change the Control's Appearance

XRControlStyle Class

XRControlStyle Members

DevExpress.XtraReports.UI Namespace