Training for D-Day

ブログの内容は個人の見解であり、所属する企業を代表するものではありません。

WPFのTextBoxのテキスト縦位置調整 VerticalContentAlignment

何も設定しないと、以下のようになっちゃいます。 image

xamlで以下のように書きます。

<TextBox VerticalContentAlignment="Center" />

image

すると中央に表示されました。

VerticalContentAlignment属性を利用します。