title: Xamarin Forms ListView scroll position
body: <p>I have a very simple master-detail view with the list of the meetings on the left and the selected meeting details on the main area.</p>
  
  <p>There are some meetings which details screen is bigger and it is scrollable.</p>
  
  <p>The problem I have is:</p>
  
  <ul>
  <li>go to one of the bigger meetings (like meeting #11)</li>
  <li>scroll down a little bit</li>
  <li>go to the the meeting which screen fits perfectly without scrolling (meeting #2 for instance)</li>
  <li>the meeting details is cut at the top (see below)</li>
  </ul>
  
  <p><strong>After scrolling down meeting #11</strong></p>
  
  <p><a href="https://i.stack.imgur.com/pz9SX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pz9SX.png" alt="After scrolling down meeting #11"></a></p>
  
  <p><strong>After selecting meeting #2</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ni1X1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ni1X1.png" alt="After selecting meeting #2"></a></p>
  
  <p>All I do is just change the binding context of the details screen.</p>
  
  <p>Is this some kind of bug / feature or what?
  I could try to add some piece of code that scrolls to the top after the selected item has been changed but I would like to avoid this, especially that my ListView contains a header and there is only API to scroll to the first item element.</p>
  
  <p>Xamarin Studio 6.1.2 (build 44)</p>
  
  <p>Xamarin Forms 2.3.2.127</p>
  
  <p><strong>Update 1 - added page XAML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      xmlns:local="clr-namespace:ListViewScrollToTop"
      x:Class="ListViewScrollToTop.ListViewScrollToTopPage"&gt;
      &lt;StackLayout Orientation="Horizontal" Spacing="0"&gt;
          &lt;ListView x:Name="MeetingsView" WidthRequest="300" VerticalOptions="Fill"
              SeparatorVisibility="None"
              BackgroundColor="Teal"
              ItemTapped="OnMeetingTapped"&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell&gt;
                          &lt;Grid&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto"/&gt;
                                  &lt;RowDefinition Height="Auto"/&gt;
                              &lt;/Grid.RowDefinitions&gt;
                              &lt;Label Grid.Row="0" Text="{Binding Title}"/&gt;
                              &lt;Label Grid.Row="1" Text="{Binding Location}"/&gt;
                          &lt;/Grid&gt;
                      &lt;/ViewCell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
          &lt;ListView x:Name="MeetingDetailsView"
              HorizontalOptions="FillAndExpand"
              VerticalOptions="FillAndExpand"
              SeparatorVisibility="None"
              BackgroundColor="Blue"
              HasUnevenRows="true"
              Header="{Binding .}"
              ItemsSource="{Binding .}"&gt;
              &lt;ListView.HeaderTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Grid BackgroundColor="White" RowSpacing="0"&gt;
                              &lt;Grid.RowDefinitions&gt;
                                  &lt;RowDefinition Height="Auto"/&gt;
                                  &lt;RowDefinition Height="Auto"/&gt;
                              &lt;/Grid.RowDefinitions&gt;
                              &lt;Label Grid.Row="0" Text="{Binding Title}"/&gt;
                              &lt;Label Grid.Row="1" Text="{Binding Location}"/&gt;
                          &lt;/Grid&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.HeaderTemplate&gt;
              &lt;ListView.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;ViewCell&gt;
                          &lt;ViewCell.View&gt;
                              &lt;StackLayout Orientation="Vertical" Spacing="10" Padding="12" BackgroundColor="Yellow"&gt;
                                  &lt;Label Text="{Binding Name}"/&gt;
                                  &lt;local:RepeaterView Spacing="1"
                                      ItemsSource = "{Binding Documents}"
                                      VerticalOptions="Start"&gt;
                                      &lt;local:RepeaterView.ItemTemplate&gt;
                                          &lt;DataTemplate&gt;
                                              &lt;Label Text="{Binding Name}" TextColor="Black" BackgroundColor="Olive" Margin="12"/&gt;
                                          &lt;/DataTemplate&gt;
                                      &lt;/local:RepeaterView.ItemTemplate&gt;
                                  &lt;/local:RepeaterView&gt;
                              &lt;/StackLayout&gt;
                          &lt;/ViewCell.View&gt;
                      &lt;/ViewCell&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListView.ItemTemplate&gt;
          &lt;/ListView&gt;
      &lt;/StackLayout&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p><strong>Update 2 - added Android test feedback</strong></p>
  
  <p>I cannot reproduce this bug on Android, only iOS.</p>
  
  <p><strong>Update 3 - test without the header</strong></p>
  
  <p>Even if I remove the details header, I can observe the issue.</p>
  
  <p><strong>Update 4 - linked solution demonstrating the problem</strong></p>
  
  <p><a href="https://www.dropbox.com/s/j6nz5k5a82mtji8/ListViewScrollToTop.zip?dl=0" rel="nofollow noreferrer">ListViewScrollToTop</a></p>