Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to use xaml grid margin

$
0
0

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" />


`


Viewing all articles
Browse latest Browse all 58056

Trending Articles