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"/>

属性值

文本对齐方式。 默认值为 Left

适用于