You have to use HorizontalContentAlignment="Center" and! Width="Auto".
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.
Sample:
Label label = new Label();
label.HorizontalContentAlignment = HorizontalAlignment.Center;
Source: Stackoverflow.com