title: Xamarin Forms ListView with HasUnEvenRows=True Occupies complete screen
body: <p>I have different views along with <code>ListView</code> on my screen. <code>ListView</code> almost fills the screen and elements below the <code>ListView</code> are not visible. I have set <code>HasUnEvenRows=True</code> because each list item has different height.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;StackLayout Spacing="0"&gt;
  &lt;local:PageHeader&gt;&lt;/local:PageHeader&gt;
  
  &lt;Grid Padding="25,15,25,10" Grid.RowSpacing="0"&gt;
  
    &lt;Grid.ColumnDefinitions&gt;
      &lt;ColumnDefinition Width="Auto"&gt;&lt;/ColumnDefinition&gt;
      &lt;ColumnDefinition Width="*"&gt;&lt;/ColumnDefinition&gt;
      &lt;ColumnDefinition Width="Auto"&gt;&lt;/ColumnDefinition&gt;
    &lt;/Grid.ColumnDefinitions&gt;
  
    &lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
    &lt;/Grid.RowDefinitions&gt;
  
    &lt;Label Grid.Column="0" Grid.Row="0" VerticalOptions="CenterAndExpand" Grid.ColumnSpan="1" Text="{local:Translate FROM_COLON}" FontSize="18"&gt;&lt;/Label&gt;
  
    &lt;StackLayout Orientation="Vertical" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3" Grid.ColumnSpan="3"&gt;
      &lt;Label Text="{Binding Group}" TextColor="{x:Static local:ColorUtils.DarkBlue}" FontStyle="Bold" FontSize="18"&gt;&lt;/Label&gt;
      &lt;Label Text="{Binding Sender, StringFormat='&amp;lt;{0}&amp;gt;'}" TextColor="{x:Static local:ColorUtils.DarkBlue}" FontSize="18"&gt;&lt;/Label&gt;
    &lt;/StackLayout&gt;
  
    &lt;ContentView  Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Padding="0,15,0,0"&gt;
    &lt;Button Text="{Binding DetailsButtonTitle}" Clicked="OnDetailButtonClick" BackgroundColor="Transparent" TextColor="{x:Static local:ColorUtils.DarkBlue}" HorizontalOptions="Start" VerticalOptions="StartAndExpand" Padding="0"&gt;&lt;/Button&gt;
    &lt;/ContentView&gt;
    &lt;Button Grid.Column="3" Grid.Row="1" Grid.RowSpan="{Binding ReplyButtonRowSpan}" Text="{local:Translate REPLY}" Image="reply_arrow_small" BackgroundColor="Transparent" TextColor="{x:Static local:ColorUtils.Gray}" HorizontalOptions="End" VerticalOptions="EndAndExpand" Padding="0" FontSize="13" WidthRequest="65" Clicked="OnReplyButtonClick"&gt;&lt;/Button&gt;
  
  
    &lt;Label Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" IsVisible="{Binding IsDetailShown, Converter={local:NotConverter Convert}}" Text="{Binding HumanizedDateFormat}" TextColor="{x:Static local:ColorUtils.Gray}"&gt;&lt;/Label&gt;
  
    &lt;ContentView Padding="0,0,0,5" Grid.Column="0" Grid.Row="2" IsVisible="{Binding IsDetailShown}" &gt;
      &lt;Label Text="{local:Translate FROM_COLON}" TextColor="{x:Static local:ColorUtils.Gray}" FontStyle="Bold" /&gt;
    &lt;/ContentView&gt;
    &lt;StackLayout Orientation="Horizontal" Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Grid.ColumnSpan="3" IsVisible="{Binding IsDetailShown}"&gt;
      &lt;Label VerticalTextAlignment="Start" Text="{Binding Group}" TextColor="{x:Static local:ColorUtils.Gray}" FontStyle="Bold" /&gt;
      &lt;Label VerticalTextAlignment="Start" Text="{Binding Sender, StringFormat='&amp;lt;{0}&amp;gt;'}" TextColor="{x:Static local:ColorUtils.Gray}"&gt;&lt;/Label&gt;
    &lt;/StackLayout&gt;
  
    &lt;Label Grid.Column="0" Grid.Row="4" Grid.RowSpan="1" IsVisible="{Binding IsDetailShown}" Text="{local:Translate TO_COLON}" TextColor="{x:Static local:ColorUtils.Gray}" FontStyle="Bold" /&gt;
    &lt;ListView x:Name="ListToAddresses" Grid.RowSpan="1" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="3" IsVisible="{Binding IsDetailShown}" HeightRequest="{Binding ListHeight}" VerticalOptions="Start" HasUnevenRows="True" CachingStrategy="RecycleElement" ItemsSource="{Binding Recipients}" SeparatorVisibility="None"&gt;
      &lt;ListView.ItemTemplate&gt;
        &lt;DataTemplate&gt;
          &lt;ViewCell IsEnabled="False"&gt;
            &lt;StackLayout VerticalOptions="Start" Padding="0,0,0,12" &gt;
                &lt;Label Text="{Binding Path=Key}" VerticalTextAlignment="Start" TextColor="{x:Static local:ColorUtils.Gray}" FontStyle="Bold" VerticalOptions="Start" /&gt;
                &lt;Label Text="{Binding Path=Value}" VerticalTextAlignment="Start"  TextColor="{x:Static local:ColorUtils.Gray}" VerticalOptions="Start" /&gt;
            &lt;/StackLayout&gt;
          &lt;/ViewCell&gt;
        &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;
    &lt;/ListView&gt;
  
    &lt;ContentView Padding="0,5,0,0" Grid.Column="0" Grid.Row="5" IsVisible="{Binding IsDetailShown}"&gt;
      &lt;Label Text="{local:Translate DATE_COLON}" TextColor="{x:Static local:ColorUtils.Gray}"  FontStyle="Bold" /&gt;
    &lt;/ContentView&gt;
    &lt;Label Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="3" VerticalTextAlignment="End" IsVisible="{Binding IsDetailShown}" Text="{Binding LongDateFormat}" TextColor="{x:Static local:ColorUtils.Gray}"&gt;&lt;/Label&gt;
  &lt;/Grid&gt;
  &lt;BoxView HeightRequest="1" BackgroundColor="{x:Static local:ColorUtils.LightGray}"&gt;&lt;/BoxView&gt;
  &lt;ContentView Padding="25,15,25,0"&gt;
    &lt;Label Text="{Binding Description}" FontSize="18"&gt;&lt;/Label&gt;
  &lt;/ContentView&gt;
  &lt;/StackLayout&gt;
  </code></pre>