In the following XAML, the word \"Test\" centers horizontally but not vertically.
How can I get it to center vertically?
I stumbled across this which seems to work perfectly:
The Grid ensures that the single TextBox within it fills the solitary cell in the grid and the VerticalAlignment in the TextBlock ensures that the text is centered within than.
Simply position/align your text horizontally however you require (the above snippet centers it in this axis also, but changing this doesn't alter the vertical centering).