Centering text vertically and horizontally in TextBlock and PasswordBox in windows store app

前端 未结 3 1290
小鲜肉
小鲜肉 2020-12-18 17:54

I am trying to center the text in a TextBlock and PasswordBox.

In TextBlock I use TextAlignment Property to center the text horizontally, but it still close to the t

3条回答
  •  甜味超标
    2020-12-18 18:29

    Change the TextBlock to a Label. A Label has a VerticalContentAlignment property which is used to center the content vertically.

提交回复
热议问题