Skip to content

Latest commit

 

History

History
60 lines (34 loc) · 1.54 KB

textalignment.md

File metadata and controls

60 lines (34 loc) · 1.54 KB
-api-id -api-type
T:Microsoft.UI.Xaml.TextAlignment
winrt enum

TextAlignment

-description

Specifies whether text is centered, left-aligned, or right-aligned.

-xaml-syntax

<object property="textAlignmentMemberName"/>

-enum-fields

-field Center:0

Text is centered within the container.

-field Left:1

Text is aligned to the left edge of the container.

-field Right:2

Text is aligned to the right edge of the container.

-field Justify:3

Text is justified within the container.

-field DetectFromContent:4

Text alignment is inferred from the text content.

-field End:2

The end of the text is aligned to the edge of the container.

-field Start:1

The beginning of the text is aligned to the edge of the container.

-remarks

When the TextAlignment property is set to DetectFromContent, alignment is inferred from the text content of the control. For example, English text is left aligned, and Arabic text is right aligned.

-examples

-see-also

RichEditBox.TextAlignment, RichTextBlock.TextAlignment, TextBlock.TextAlignment, TextBox.TextAlignment, FlowDirection, How to support bidirectional UI