共用方式為


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

適用於