title: ScrollViewer not Scrolling with UWP Windows 10 Phone
body: <p>my apologies for my simple wording, but I am an apprentice and new to Windows 10 and UWP development.</p>
  
  <p>I am currently creating a manuals page for our APP which can be called from many different pages and dependant upon which page calls it is called from it will display the relevant manual for that page.</p>
  
  <p>I did try PDF's but found the handling for the PDF's extremely slow and quirky so I have saved all pages for the manuals as .PNG files.</p>
  
  <p>I have a dictionary item in the XAML which contains the links for the files, in my C# code I decide on the page and for which manual to display. </p>
  
  <p>Some pages may have only one page others may have 6 or more.</p>
  
  <p>I plan for the time being to contain the pictures within a ScrollView with Zoom Enabled this works perfectly apart from one major problem.</p>
  
  <p>I am trying to create a ScrollViewer with 6 Images (Vertically aligned). Because of the Images size you can only see 2 on the screen (hence needing a ScrollViewer). The only way which I can actually scroll down to see the rest of the images is by zooming in, and then scrolling. You need to do this multiple times to get to the bottom, but when you zoom back out to see the full image the ScrollViewer scrolls back up to the top.</p>
  
  <p>Here is my Xaml Code:</p>
  
  <pre><code>&lt;ScrollViewer x:Name="MyScrollViewer" ZoomMode="Enabled" MaxZoomFactor="5" MinZoomFactor="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible"  VerticalScrollMode="Enabled"&gt;
      &lt;StackPanel Orientation="Vertical" VerticalAlignment="Stretch"&gt;
          &lt;Image Name="HelpManual" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual2" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual3" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual4" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual5" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual6" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
      &lt;/StackPanel&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>All images are set to BlankPage Resource (which is nothing) as I will be using this on another page which will have less images on. I just Change the Image source from the code behind this.
  Page.Resource:</p>
  
  <pre><code>&lt;Page.Resources&gt;
      &lt;BitmapImage x:Key="BlankPage" UriSource="" /&gt;
      &lt;BitmapImage x:Key="LightingPage" UriSource="Assets\AppPages\HelpManuals\LightingPageManual.png" /&gt;
      &lt;BitmapImage x:Key="PowerPage" UriSource="Assets\AppPages\HelpManuals\PowerPageManual.png" /&gt;
      &lt;BitmapImage x:Key="WaterPage" UriSource="Assets\AppPages\HelpManuals\WaterPageManual.png" /&gt;
      &lt;BitmapImage x:Key="HeatingPage" UriSource="Assets\AppPages\HelpManuals\HeatingPageManual.png" /&gt;
      &lt;BitmapImage x:Key="RemotePage" UriSource="Assets\AppPages\HelpManuals\RemotePageManual.png" /&gt;
      &lt;BitmapImage x:Key="BluetoothPage" UriSource="Assets\AppPages\HelpManuals\BluetoothPageManual.png" /&gt;
  &lt;/Page.Resources&gt;
  </code></pre>
  
  <p>The Image Sources are kept in a Page resource at the top of this file, and are changed in the code behind like this:</p>
  
  <pre><code>void Page_LoadComplete(object sender, RoutedEventArgs e)
  {
      var lastPage = Frame.BackStack.Last().SourcePageType;
  
      if (lastPage.Name == "PowerPage")
      {
          HelpManual.Source = (ImageSource)Resources["PowerPage"];
      }
      else if (lastPage.Name == "MainPage")
      {
          HelpManual.Source = (ImageSource) Resources["LightingPage"];
          HelpManual2.Source = (ImageSource) Resources["PowerPage"];
          HelpManual3.Source = (ImageSource)Resources["WaterPage"];
          HelpManual4.Source = (ImageSource)Resources["HeatingPage"];
          HelpManual5.Source = (ImageSource)Resources["RemotePage"];
          HelpManual6.Source = (ImageSource)Resources["BluetoothPage"];
      }
  }
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thank you @LovetoCode for your suggestion. I have amended my Scrollviewer to have a Grid instead of a StackPanel, but the problem persists. </p>
  
  <p>I have created 6 rows in the Grid (one for each item) and added each item to their separate row. However it is still a fight to scroll down. 
  The only real way to 'scroll' is by placing a finger on the screen and then scrolling with another finger, which is similar to zooming. As soon as you take your finger off of the screen the ScrollViewer goes straight back up to the top again. When I removed the rows from the new grid, Only one image was shown and the rest were nowhere to be seen. </p>
  
  <p>Here is my New ScrollViewer:</p>
  
  <pre><code>&lt;ScrollViewer x:Name="MyScrollViewer" ZoomMode="Enabled" MaxZoomFactor="5" MinZoomFactor="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible"  VerticalScrollMode="Enabled" &gt;
      &lt;Grid Name="MyScrollViewGrid" &gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="*" /&gt;
              &lt;RowDefinition Height="*" /&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;Image Name="HelpManual" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual2" Grid.Row="1" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual3" Grid.Row="2" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual4" Grid.Row="3" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual5" Grid.Row="4" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
          &lt;Image Name="HelpManual6" Grid.Row="5" Source="{StaticResource BlankPage}" Width="{Binding Path=ViewportWidth, ElementName=MyScrollViewer}"/&gt;
      &lt;/Grid&gt;                   
  &lt;/ScrollViewer&gt;
  </code></pre>