TextBlock.TextAlignment Property

July 28, 2014

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:
© 2014 Microsoft