Align button content Align button content wpf wpf

Align button content


You don't need the StackPanel or the TextBlock. All you need is

<Button HorizontalContentAlignment="Left" Content="Save" />


You can align in two way, Horizontal and Vertical

<Button Content="Export" VerticalContentAlignment="Bottom" name="MyBtn1"  />

or

<Button Content="Export" HorizontalContentAlignment="Center" name="MyBtn2"  />

See the follow image to view the possibilities settings:

enter image description here

enter image description here