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