Back to API Reference
Enum
HorizontalAlignment
Specifies horizontal text alignment within the layout bounds.
Remarks
Start, End and Justify are logical: they resolve against each paragraph's own base direction (UAX #9), so a single value produces different edges for differently-directed paragraphs of the same text. Left and Right are physical and ignore direction. Mirrors CSS text-align, which carries both families.public static readonly HorizontalAlignment Start = 0Align to the paragraph start edge — left in LTR, right in RTL.
public static readonly HorizontalAlignment Center = 1Center text horizontally.
public static readonly HorizontalAlignment End = 2Align to the paragraph end edge — right in LTR, left in RTL.
public static readonly HorizontalAlignment Justify = 3Stretch each line to fill the full available width by distributing extra space according to TextJustify. The final line of each paragraph is aligned per LastLineAlignment (defaults to start, matching CSS text-align-last: auto).
public static readonly HorizontalAlignment Left = 4Align to the left edge whatever the paragraph direction.
public static readonly HorizontalAlignment Right = 5Align to the right edge whatever the paragraph direction.
