title: Format button inside grid.column
body: <p>I'm going crazy with a problem involving the formatting buttons within a grid.
  I'm working with Visual Studio 2015 with Xamarin (last updated).</p>
  
  <p>I cannot define and centralize the buttons. They are larger than the columns and lose content when you do not fit in width.</p>
  
  <p>My code is:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand"&gt;
      &lt;Button BackgroundColor="Red" Text="Login" /&gt;
      &lt;ScrollView Orientation="Vertical" VerticalOptions="FillAndExpand"&gt;
          &lt;StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand"&gt;
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
  
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="*" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
  
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="*" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                          &lt;ColumnDefinition Width="*" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
  
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
  
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
  
              &lt;Frame BackgroundColor="#ffc0ff"
                     OutlineColor="#000000"
                     Padding="2,2,2,2"&gt;
                  &lt;Grid&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="Auto" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                          &lt;ColumnDefinition Width="Auto" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="0"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="1"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="1"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="2"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="2"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="3"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="3"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="4"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="4"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="5"
                              TextColor="Black" /&gt;
                      &lt;Button Grid.Row="0"
                              Grid.Column="5"
                              BorderColor="Black"
                              BorderRadius="10"
                              Text="6"
                              TextColor="Black" /&gt;
                  &lt;/Grid&gt;
              &lt;/Frame&gt;
          &lt;/StackLayout&gt;
      &lt;/ScrollView&gt;
      &lt;Button BackgroundColor="Green" Text="Login" /&gt;
  &lt;/StackLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is what it looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/ky5BZ.png" alt="This is what it looks like"></p>