How to use xaml grid margin

wc.5543wc.5543 USUniversity ✭✭

I am pretty new to XAML, how do i set up the grid using margin so that the margin to the left and margin to the right label are equal with defined ma row/column are lined up nicely?

`

    <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="200" />
      <ColumnDefinition Width="200" />
    </Grid.ColumnDefinitions>

    <Label Text="row 0 column 0"
           Grid.Row="0" Grid.Column="0"
           TextColor="Purple"
           BackgroundColor="Aqua"
           XAlign="Center"
           YAlign="Center" />

   <Label Text="row 0 column 1"
           Grid.Row="0" Grid.Column="1" 
           TextColor="Purple"
           BackgroundColor="Aqua"
           XAlign="Center"
           YAlign="Center" />


`

Sign In or Register to comment.