TextBlock.TextAlignment Property

Definition

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

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.TextBlock.TextAlignment.

public:
 property TextAlignment TextAlignment { TextAlignment get(); void set(TextAlignment value); };
TextAlignment TextAlignment();

void TextAlignment(TextAlignment value);
public TextAlignment TextAlignment { get; set; }
var textAlignment = textBlock.textAlignment;
textBlock.textAlignment = textAlignment;
Public Property TextAlignment As TextAlignment
<TextBlock TextAlignment="textAlignmentMemberName"/>

Property Value

TextAlignment

The text alignment. The default is Left.

Applies to