Button HorizontalAlignment="Center"
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" WindowTitle="Xaml Page"> <StackPanel> <Button HorizontalAlignment="Center" Margin="24"> Hello, XAML! </Button> </StackPanel> </Page>