title: ListView inside StackLayout: How to auto resize the ListView?
body: <p>I put a <code>ListView</code> and a Label, immediately after it, but on screen, there is a Empty space between the <code>ListView</code> and the Label with the Text <em>ms</em>.
  <a href="https://i.stack.imgur.com/Rz3vB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rz3vB.png" alt="ListView Windows 10 Mobile" /></a></p>
  <p><a href="https://i.stack.imgur.com/baLNe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/baLNe.png" alt="ListView Android" /></a>
  I would like the <code>ListView</code> to expand automatically, when the items are present.
  Or is there an <code>ItemsControl</code>, like WPF?</p>
  <p>I have this XAML:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;ContentPage xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
               xmlns:local=&quot;clr-namespace:Forms&quot;             
               x:Class=&quot;Forms.MainPage&quot;&gt;
      &lt;ContentPage.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;local:MyConverter x:Key=&quot;MyConverter&quot;&gt;&lt;/local:MyConverter&gt;
          &lt;/ResourceDictionary&gt;
      &lt;/ContentPage.Resources&gt;
      &lt;ScrollView Orientation=&quot;Vertical&quot;&gt;
          &lt;StackLayout Padding=&quot;10,10,10,10&quot;&gt;
              &lt;Label FontSize=&quot;20&quot; FontAttributes=&quot;Bold&quot;&gt;Cartão de Ponto&lt;/Label&gt;
              &lt;Label&gt;Nome:&lt;/Label&gt;
              &lt;Label Text=&quot;{Binding Path=Pessoa.Nome}&quot; /&gt;
              &lt;Label&gt;CPF:&lt;/Label&gt;
              &lt;Label Text=&quot;{Binding Path=Pessoa.CPF}&quot; /&gt;
  
              &lt;Grid Padding=&quot;0&quot; MinimumHeightRequest=&quot;40&quot;&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width=&quot;70&quot; /&gt;
                      &lt;ColumnDefinition Width=&quot;35&quot; /&gt;
                      &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                      &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                      &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
                  &lt;Label FontSize=&quot;10&quot; Text=&quot;Data&quot; FontAttributes=&quot;Bold&quot; VerticalTextAlignment=&quot;End&quot; /&gt;
                  &lt;Label FontSize=&quot;10&quot; Grid.Column=&quot;1&quot; Text=&quot;Dia&quot; FontAttributes=&quot;Bold&quot; VerticalTextAlignment=&quot;End&quot; /&gt;
                  &lt;Label FontSize=&quot;10&quot; Grid.Column=&quot;2&quot; Text=&quot;Hora Entrada&quot; FontAttributes=&quot;Bold&quot; VerticalTextAlignment=&quot;End&quot; /&gt;
                  &lt;Label FontSize=&quot;10&quot; Grid.Column=&quot;3&quot; Text=&quot;Hora Saída&quot; FontAttributes=&quot;Bold&quot; VerticalTextAlignment=&quot;End&quot; /&gt;
                  &lt;Label FontSize=&quot;10&quot; Grid.Column=&quot;4&quot; Text=&quot;Horas Trabalhadas&quot; HorizontalTextAlignment=&quot;End&quot; FontAttributes=&quot;Bold&quot; /&gt;
              &lt;/Grid&gt;
  
              &lt;!-- HeightRequest=&quot;0&quot;--&gt;
              &lt;ListView x:Name=&quot;lv1&quot; ItemsSource=&quot;{Binding Path=Pontos}&quot; 
                        VerticalOptions=&quot;FillAndExpand&quot;
                          HasUnevenRows=&quot;False&quot;
                        &gt;
                  &lt;ListView.Header&gt;
                      &lt;StackLayout HeightRequest=&quot;0&quot; /&gt;
                  &lt;/ListView.Header&gt;
                  &lt;!-- ItemTemplate --&gt;
                  &lt;ListView.Footer&gt;
                      &lt;StackLayout HeightRequest=&quot;0&quot; /&gt;
                  &lt;/ListView.Footer&gt;
                  &lt;ListView.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ViewCell&gt;
                              &lt;ViewCell.View&gt;
                                  &lt;Grid&gt;
                                      &lt;Grid.ColumnDefinitions&gt;
                                          &lt;ColumnDefinition Width=&quot;70&quot; /&gt;
                                          &lt;ColumnDefinition Width=&quot;35&quot; /&gt;
                                          &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                                          &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                                          &lt;ColumnDefinition Width=&quot;60&quot; /&gt;
                                      &lt;/Grid.ColumnDefinitions&gt;
                                      &lt;Label FontSize=&quot;12&quot; Text=&quot;{Binding Path=Data, StringFormat='{0:dd/MM/yyyy}'}&quot; /&gt;
                                      &lt;Label FontSize=&quot;12&quot; Grid.Column=&quot;1&quot; Text=&quot;{Binding Path=DiaSemana}&quot; /&gt;
                                      &lt;Label FontSize=&quot;12&quot; Grid.Column=&quot;2&quot; Text=&quot;{Binding Path=HoraEntrada}&quot; /&gt;
                                      &lt;Label FontSize=&quot;12&quot; Grid.Column=&quot;3&quot; Text=&quot;{Binding Path=HoraSaida}&quot; /&gt;
                                      &lt;Label FontSize=&quot;12&quot; Grid.Column=&quot;4&quot; Text=&quot;{Binding Path=HorasTrabalhadas, Converter={StaticResource MyConverter}}}&quot; /&gt;
                                  &lt;/Grid&gt;
                              &lt;/ViewCell.View&gt;
                          &lt;/ViewCell&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListView.ItemTemplate&gt;
              &lt;/ListView&gt;
              &lt;!-- Why is this White space on screen? --&gt;
              &lt;StackLayout Orientation=&quot;Horizontal&quot;&gt;
                  &lt;Label x:Name=&quot;lbl1&quot; /&gt;
                  &lt;Label&gt;ms&lt;/Label&gt;
              &lt;/StackLayout&gt;
  
              &lt;Button x:Name=&quot;ButtonPegaCartaoPonto&quot; Text=&quot;Carregar&quot; /&gt;
  
              &lt;Label&gt;&lt;/Label&gt;
              &lt;Label&gt;&lt;/Label&gt;
          &lt;/StackLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  <p>But the ListView lv1 does not automatically expand Horizontally to fit the Items.</p>
  <p>How to do this?</p>