how to set textalignment label wpf code example
Example 1: set text in center wpf
<Button Height="23" HorizontalAlignment="Left" Margin="190,115,0,0" Name="MyButton" VerticalAlignment="Top" Width="75" HorizontalContentAlignment="Stretch">
<TextBlock Text="Shahin" TextAlignment="Center" />
</Button >
Example 2: xaml center label
<Label Text="Text Here" HorizontalTextAlignment="Center" FontSize="Title"/>