title: How to automatically scroll a scrollviewer using c#
body: <p>I am trying to scroll a scrollviewer to a specific position.</p>
  
  <p>But the scrollviewer is stoping after scrolling to a specific position.</p>
  
  <p>xaml:</p>
  
  <pre><code>&lt;Grid x:Name="LayoutRoot"&gt;
  &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto"/&gt;
          &lt;RowDefinition Height="0.01*"/&gt;
          &lt;RowDefinition Height="*"/&gt;
          &lt;RowDefinition Height="*"/&gt;
  &lt;/Grid.RowDefinitions&gt;
  
  &lt;Stackpanel Grid.row=0------/&gt;
  
  &lt;ScrollViewer Name="DataList" Grid.Row="2" Grid.RowSpan="2" Grid.Column="1"&gt;
  
      &lt;Grid Name="ScrollContent" Margin="0,0,0,0" Height="1000"&gt;
        &lt;Grid.RowDefinitions&gt;
           &lt;RowDefinition Height="1.5*"/&gt;
           &lt;RowDefinition Height="1.5*"/&gt;
        &lt;/Grid.RowDefinitions&gt;
       &lt;ScrollViewer Grid.Row="0" Grid.Column="0" Name="DataViewer1" VerticalScrollBarVisibility="Visible"&gt;
        -----//code
     &lt;/ScrollViewer&gt;
       &lt;Grid Grid.Row="1" Grid.Column="0" Name="DataViewer" &gt;
        ----//code
       &lt;/Grid&gt;
  
     &lt;/Grid&gt;
   &lt;/Scrollviewer&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>I am using the below line: </p>
  
  <pre><code>   DataList.ScrollToVerticalOffset(500);
  </code></pre>
  
  <p>The behaviour is same when i change the above line to </p>
  
  <pre><code>  DataList.ScrollToVerticalOffset(1000);
  </code></pre>
  
  <p>Please Help!</p>