TextAlignment Enum

Definition

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

public enum class TextAlignment
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class TextAlignment
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum TextAlignment
Public Enum TextAlignment
<object property="textAlignmentMemberName"/>
Inheritance
TextAlignment
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Center 0

Text is centered within the container.

DetectFromContent 4

Text alignment is inferred from the text content.

End 2

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

Justify 3

Text is justified within the container.

Left 1

Text is aligned to the left edge of the container.

Right 2

Text is aligned to the right edge of the container.

Start 1

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

Remarks

DetectFromContent is available starting with Windows 10. 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.

Version history

Windows version SDK version Value added
1709 16299 End
1709 16299 Start

Applies to

See also