Delen via


TextBlock.TextAlignment Property

Definition

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

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

The text alignment. The default is Left.

Applies to