TextAlignment Property

TextBlock.TextAlignment Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets a value that indicates the horizontal alignment of text content.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public TextAlignment TextAlignment { get; set; }
<TextBlock TextAlignment="textAlignmentValue"/>

XAML Values

textAlignmentValue

A named constant of the TextAlignment enumeration.

Property Value

Type: System.Windows.TextAlignment
The text alignment. The default is TextAlignment.Left.

Dependency property identifier field: TextAlignmentProperty

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft