title: set border to listview Xamarin form
body: <p>I made a table with xamarin forms, but I would like the headers not to have blank spaces and also put borders, use table-striped, have the basic characteristics of a bootstrap table for example. Could you help me?. Thank you for you help.</p>
  
  <p><a href="https://i.stack.imgur.com/x3Em4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x3Em4.png" alt="enter image description here"></a></p>
  
  <p>Here my code.</p>
  
  <pre><code> &lt;StackLayout BindingContext="{Binding OpportunityListViewModel}" Padding="8"&gt;
          &lt;ListView x:Name="ProposalListProduct"
                  ItemsSource="{Binding ProposalView}"
                  IsRefreshing="{Binding IsRefreshing}"
                  CachingStrategy="RecycleElement"
                  HasUnevenRows="True"
                   Margin="0"&gt;
              &lt;ListView.Header&gt;
                  &lt;Grid Margin="0" Padding="0" RowSpacing="0"&gt;
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="50*" /&gt;
                          &lt;ColumnDefinition Width="10*" /&gt;
                          &lt;ColumnDefinition Width="20*" /&gt;
                          &lt;ColumnDefinition Width="20*" /&gt;
                      &lt;/Grid.ColumnDefinitions&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height="20" /&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Label Grid.Row="0" Grid.Column="0" Margin="0" Text="Item" FontSize="8" TextColor="Black" BackgroundColor="LightGray" HorizontalTextAlignment="Center" HorizontalOptions="Fill" /&gt;
                      &lt;Label Grid.Row="0" Grid.Column="1" Margin="0" Text="Cant."  FontSize="8" TextColor="Black" BackgroundColor="LightGray" HorizontalTextAlignment="Center" HorizontalOptions="Fill" /&gt;
                      &lt;Label Grid.Row="0" Grid.Column="2" Margin="0" Text="Precio"  FontSize="8" TextColor="Black" BackgroundColor="LightGray" HorizontalTextAlignment="Center" HorizontalOptions="Fill" /&gt;
                      &lt;Label Grid.Row="0" Grid.Column="3" Margin="0" Text="Total"  FontSize="8" TextColor="Black" BackgroundColor="LightGray" HorizontalTextAlignment="Center" HorizontalOptions="Fill" /&gt;
  
                  &lt;/Grid&gt;
              &lt;/ListView.Header&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell&gt;
                          &lt;ViewCell.View&gt;
                              &lt;Grid Margin="0" Padding="0" RowSpacing="0" ColumnSpacing="0"&gt;
                                  &lt;Grid.ColumnDefinitions&gt;
                                      &lt;ColumnDefinition Width="50*" /&gt;
                                      &lt;ColumnDefinition Width="10*" /&gt;
                                      &lt;ColumnDefinition Width="20*" /&gt;
                                      &lt;ColumnDefinition Width="20*" /&gt;
                                  &lt;/Grid.ColumnDefinitions&gt;
                                  &lt;Grid.RowDefinitions&gt;
                                      &lt;RowDefinition Height="20"  /&gt;
                                  &lt;/Grid.RowDefinitions&gt;
                                  &lt;Label Grid.Column="0" Margin="0" x:Name="Nombre" Text="{Binding Nombre}" FontSize="8" TextColor="Black" VerticalTextAlignment="End" HorizontalTextAlignment="Start" /&gt;
                                  &lt;Label Grid.Column="1" Margin="0" x:Name="Cantidad" Text="{Binding Cantidad}" FontSize="8" TextColor="Black" VerticalTextAlignment="End" HorizontalTextAlignment="End"/&gt;
                                  &lt;Label Grid.Column="2" Margin="0" x:Name="Precio" Text="{Binding Precio,StringFormat='{0:C2}'}" FontSize="8" TextColor="Black" VerticalTextAlignment="End" HorizontalTextAlignment="End"/&gt;
                                  &lt;Label Grid.Column="3" Margin="0" x:Name="Total" Text="{Binding Total,StringFormat='{0:C2}'}" FontSize="8" TextColor="Black" VerticalTextAlignment="End" HorizontalTextAlignment="End"/&gt;
                              &lt;/Grid&gt;
                          &lt;/ViewCell.View&gt;
                      &lt;/ViewCell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
      &lt;/StackLayout&gt;
  </code></pre>