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
Change the TextBlock to a Label. A Label has a VerticalContentAlignment property which is used to center the content vertically.