title: Xamarin forms List view not filling in Horizantal orientation
body: <p>My Listview is filling half of the screen when I make some controls invisible.
  The listview is in a grid control. Below is my code </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;views:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:converters="clr-namespace:Sthotraani.Converters;assembly=Sthotraani"
               xmlns:behaviors="clr-namespace:Sthotraani.Behaviors;assembly=Sthotraani"
               xmlns:controls="clr-namespace:Sthotraani.CustomControls;assembly=Sthotraani"
               xmlns:views="clr-namespace:Sthotraani.Views;assembly=Sthotraani"
               x:Class="Sthotraani.Views.GodsPage"  Title="Sthotraani" x:Name="pgGod" &gt;
    &lt;ContentPage.Resources&gt;
      &lt;ResourceDictionary&gt;
        &lt;converters:ItemTappedEventArgsConverter x:Key="ItemTappedConverter" /&gt;
        &lt;converters:BoolToImageConverter x:Key="booltoimage" /&gt;
        &lt;converters:FileToImageConverter x:Key="FtoIConverter" /&gt;
        &lt;converters:BoolToHeightConverter x:Key="BoolToHeight" /&gt;
        &lt;converters:InvertBooleanConverter  x:Key="boolConvert"/&gt;
      &lt;/ResourceDictionary&gt;
    &lt;/ContentPage.Resources&gt;
    &lt;Grid HorizontalOptions="FillAndExpand"&gt;
      &lt;Grid.RowDefinitions&gt;
        &lt;RowDefinition Height="Auto" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
        &lt;ColumnDefinition Width="Auto"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid x:Name="gMain" Grid.Row="0" Grid.Column="0" HorizontalOptions="FillAndExpand"&gt;
        &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto"  /&gt;
          &lt;RowDefinition Height="{Binding ShowAd, Converter={StaticResource BoolToHeight},ConverterParameter=5|absolute}" /&gt;
          &lt;RowDefinition Height="{Binding ShowAd,Converter={StaticResource BoolToHeight},ConverterParameter=5|auto}"  /&gt;
          &lt;RowDefinition Height="5" /&gt;
          &lt;RowDefinition Height="*" /&gt;
        &lt;/Grid.RowDefinitions&gt;
        &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="Auto"/&gt;
        &lt;/Grid.ColumnDefinitions&gt;
        &lt;StackLayout x:Name="slMain" Grid.Row="0" Grid.Column="0" HorizontalOptions="FillAndExpand" MinimumWidthRequest="1000" &gt;
          &lt;StackLayout BackgroundColor="#009688"  Padding="5" IsVisible="{Binding IsSearchVisisble}" Orientation="Horizontal" &gt;
            &lt;Entry x:Name="txtSearch" Text="{Binding SearchTerm}"  Placeholder="Enter sthotram name" PlaceholderColor="Gray"  FontSize="Micro"  TextColor="Black" BackgroundColor="White" HorizontalOptions="FillAndExpand" /&gt;
          &lt;/StackLayout&gt;
          &lt;BoxView HeightRequest="5" BackgroundColor="White" IsVisible="{Binding IsSearchVisisble, Converter={StaticResource boolConvert}}" /&gt;
          &lt;controls:CarouselView ItemsSource="{Binding Gods}"
                                 x:Name="cvGods"
                                 SelectedItem="{Binding SelectedGod}"
                                 BackgroundColor="White"
                                 IsVisible="{Binding IsSearchVisisble, Converter={StaticResource boolConvert}}" &gt;
            &lt;controls:CarouselView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                &lt;StackLayout Padding="5,0,5,0" &gt;
                  &lt;StackLayout VerticalOptions="FillAndExpand"&gt;
                    &lt;StackLayout.Triggers&gt;
                      &lt;DataTrigger TargetType="StackLayout" Binding="{Binding IsSelected}" Value="true"&gt;
                        &lt;Setter Property="BackgroundColor" Value="#B2DFDB"/&gt;
                      &lt;/DataTrigger&gt;
                      &lt;DataTrigger TargetType="StackLayout" Binding="{Binding IsSelected}" Value="false"&gt;
                        &lt;Setter Property="BackgroundColor" Value="#FFFFFF"/&gt;
                      &lt;/DataTrigger&gt;
                    &lt;/StackLayout.Triggers&gt;
                    &lt;Image Source="{Binding ImageName,Converter={StaticResource FtoIConverter}}"   HorizontalOptions="Center" VerticalOptions="Center" /&gt;
                  &lt;/StackLayout&gt;
                  &lt;Label Text="{Binding Name}"
                         FontSize="Micro"
                         TextColor="Black"
                         HorizontalTextAlignment="Center" /&gt;
                &lt;/StackLayout&gt;
              &lt;/DataTemplate&gt;
            &lt;/controls:CarouselView.ItemTemplate&gt;
          &lt;/controls:CarouselView&gt;
        &lt;/StackLayout&gt;
        &lt;ContentView
                    Grid.Row="0"
                    Grid.Column="0"
                    VerticalOptions="Fill"
                    HorizontalOptions="Fill"
                    IsVisible="{Binding IsBusy}"
                    BackgroundColor="#22009485"
                    Padding="10, 0"&gt;
          &lt;ActivityIndicator VerticalOptions="Center"
                             HorizontalOptions="CenterAndExpand"
                             IsVisible="{Binding IsBusy}"
                             IsRunning="{Binding IsBusy}"
                             Color="#F98F1C"   /&gt;
        &lt;/ContentView&gt;
        &lt;BoxView BackgroundColor="Red" x:Name="bvTop"
                 HorizontalOptions="FillAndExpand"
                 HeightRequest="5"
                 Grid.Row="1" Grid.Column="0"&gt;&lt;/BoxView&gt;
        &lt;views:AdMobView WidthRequest="320"
                         HeightRequest="50"
                         x:Name="amvAds"
                         HorizontalOptions="CenterAndExpand"
                         Grid.Row="2"
                         Grid.Column="0"/&gt;
        &lt;BoxView BackgroundColor="#009688"
                 x:Name="bvBottom"
                 HorizontalOptions="FillAndExpand"
                 HeightRequest="5"
                 Grid.Row="3"
                 Grid.Column="0"&gt;&lt;/BoxView&gt;
  
        &lt;ListView x:Name="lvSthotras"
                  VerticalOptions="Start"
                  SeparatorVisibility="None"
                  ItemsSource="{Binding Sthotraas}"
                  HasUnevenRows="True"
                  HorizontalOptions="FillAndExpand"
                  CachingStrategy="RecycleElement"
                  SelectedItem="{Binding SelectedSthotram}"
                  Grid.Row="4"
                  Grid.Column="0"&gt;
          &lt;ListView.Behaviors&gt;
            &lt;behaviors:ListViewSelectedItemBehavior Command="{Binding CmdListItemTapped}" Converter="{StaticResource ItemTappedConverter}" /&gt;
          &lt;/ListView.Behaviors&gt;
          &lt;ListView.ItemTemplate&gt;
            &lt;DataTemplate&gt;
              &lt;ViewCell&gt;
                &lt;ViewCell.View&gt;
                  &lt;StackLayout&gt;
                    &lt;StackLayout Padding="10" Orientation="Horizontal"&gt;
                      &lt;Image HorizontalOptions="Start" Source="{Binding IsFavorite,Converter={StaticResource booltoimage},ConverterParameter=pickedstar.png|star.png}" VerticalOptions="CenterAndExpand" &gt;
                        &lt;Image.GestureRecognizers&gt;
                          &lt;TapGestureRecognizer Command="{Binding Path=BindingContext.CmdFavoriteTapped, Source={x:Reference pgGod}}" CommandParameter="{Binding SthotraID}" /&gt;
                        &lt;/Image.GestureRecognizers&gt;
                      &lt;/Image&gt;
                      &lt;Label  Text="{Binding Name}" HorizontalOptions="StartAndExpand" VerticalOptions="CenterAndExpand"   FontSize="Small" /&gt;
                    &lt;/StackLayout&gt;
                    &lt;BoxView BackgroundColor="#009688"
                             HeightRequest="1"
                             HorizontalOptions="FillAndExpand" /&gt;
                  &lt;/StackLayout&gt;
                &lt;/ViewCell.View&gt;
              &lt;/ViewCell&gt;
            &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
        &lt;/ListView&gt;
        &lt;ContentView Grid.Row="4"
                     Grid.Column="0"
                     VerticalOptions="Fill"
                     HorizontalOptions="Fill"
                     IsVisible="{Binding IsBusy}"
                     BackgroundColor="#22009485"
                     Padding="10, 0"&gt;
          &lt;ActivityIndicator VerticalOptions="Center"
                             HorizontalOptions="CenterAndExpand"
                             IsVisible="{Binding IsBusy}"
                             IsRunning="{Binding IsBusy}"
                             Color="#F98F1C"   /&gt;
        &lt;/ContentView&gt;
      &lt;/Grid&gt;
      &lt;StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"  Grid.Row="0" Grid.Column="0" IsVisible="{Binding IsOffline}" BackgroundColor="#009688"&gt;
      &lt;StackLayout VerticalOptions="CenterAndExpand" HorizontalOptions="Fill" Spacing="20" Padding="25"&gt;
        &lt;Label FontSize="Large" TextColor="White"  &gt;It seems you are not connected to internet, please check your network settings and click retry&lt;/Label&gt;
        &lt;Button Text="Retry" Command="{Binding CmdRetryNetwork}" Style="{StaticResource btn}"/&gt;
      &lt;/StackLayout&gt;
      &lt;/StackLayout&gt;
    &lt;/Grid&gt;
    &lt;ContentPage.ToolbarItems&gt;
      &lt;ToolbarItem Text="Search" Command="{Binding ToggleSearchCmd}" Icon="{Binding IsSearchVisisble,Converter={StaticResource booltoimage},ConverterParameter=closeicon.png|SearchIcon.png}"  Order="Primary" Priority="1"  &gt;
      &lt;/ToolbarItem&gt;
    &lt;/ContentPage.ToolbarItems&gt;
  &lt;/views:BasePage&gt;
  </code></pre>
  
  <p>Below is the part where I show are hide some controls</p>
  
  <pre><code>&lt;StackLayout x:Name="slMain" Grid.Row="0" Grid.Column="0" HorizontalOptions="FillAndExpand" MinimumWidthRequest="1000" &gt;
          &lt;StackLayout BackgroundColor="#009688"  Padding="5" IsVisible="{Binding IsSearchVisisble}" Orientation="Horizontal" &gt;
            &lt;Entry x:Name="txtSearch" Text="{Binding SearchTerm}"  Placeholder="Enter sthotram name" PlaceholderColor="Gray"  FontSize="Micro"  TextColor="Black" BackgroundColor="White" HorizontalOptions="FillAndExpand" /&gt;
          &lt;/StackLayout&gt;
          &lt;BoxView HeightRequest="5" BackgroundColor="White" IsVisible="{Binding IsSearchVisisble, Converter={StaticResource boolConvert}}" /&gt;
          &lt;controls:CarouselView ItemsSource="{Binding Gods}"
                                 x:Name="cvGods"
                                 SelectedItem="{Binding SelectedGod}"
                                 BackgroundColor="White"
                                 IsVisible="{Binding IsSearchVisisble, Converter={StaticResource boolConvert}}" &gt;
            &lt;controls:CarouselView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                &lt;StackLayout Padding="5,0,5,0" &gt;
                  &lt;StackLayout VerticalOptions="FillAndExpand"&gt;
                    &lt;StackLayout.Triggers&gt;
                      &lt;DataTrigger TargetType="StackLayout" Binding="{Binding IsSelected}" Value="true"&gt;
                        &lt;Setter Property="BackgroundColor" Value="#B2DFDB"/&gt;
                      &lt;/DataTrigger&gt;
                      &lt;DataTrigger TargetType="StackLayout" Binding="{Binding IsSelected}" Value="false"&gt;
                        &lt;Setter Property="BackgroundColor" Value="#FFFFFF"/&gt;
                      &lt;/DataTrigger&gt;
                    &lt;/StackLayout.Triggers&gt;
                    &lt;Image Source="{Binding ImageName,Converter={StaticResource FtoIConverter}}"   HorizontalOptions="Center" VerticalOptions="Center" /&gt;
                  &lt;/StackLayout&gt;
                  &lt;Label Text="{Binding Name}"
                         FontSize="Micro"
                         TextColor="Black"
                         HorizontalTextAlignment="Center" /&gt;
                &lt;/StackLayout&gt;
              &lt;/DataTemplate&gt;
            &lt;/controls:CarouselView.ItemTemplate&gt;
          &lt;/controls:CarouselView&gt;
        &lt;/StackLayout&gt;
  </code></pre>
  
  <p>Whenever I hide the carouselview above the listview will fill only half the screen. All the controls has HorizantalOptions="FillAndExpand" not sure what am I doing wrong. Below links videos will show you the behaviour</p>
  
  <p>This is when the Device Orientation is vertical, everything works</p>
  
  <p><a href="https://youtu.be/aamFaiNpUE4" rel="nofollow">https://youtu.be/aamFaiNpUE4</a></p>
  
  <p>This is when device is horizantal, this is when listview acts weird.</p>
  
  <p><a href="https://youtu.be/DX2nFJnLn3o" rel="nofollow">https://youtu.be/DX2nFJnLn3o</a></p>
  
  <p>Please help me.Thanks</p>