How to center a label text in WPF?
Solution 1:
use the HorizontalContentAlignment property.
Sample
<Label HorizontalContentAlignment="Center"/>
Solution 2:
The Control class has HorizontalContentAlignment and VerticalContentAlignment properties. These properties determine how a control’s content fills the space within the control.
Set HorizontalContentAlignment and VerticalContentAlignment to Center.
Solution 3:
You have to use HorizontalContentAlignment="Center" and! Width="Auto".