I’m trying to move a scrollbar position in a ScrollViewArea in the code-behind. This is what I’m currently doing:
try
{
ScrollViewer v = GetTemplateChild( "ScrollArea" ) as ScrollViewer;
v.SetValue( ScrollViewer.HorizontalOffsetProperty, 0 );
}
catch(Exception e)
{
System.Windows.MessageBox.Show(e.ToString());
}
But I keep getting an exception at v.SetValue.
I think you are looking for
ScrollToHorizontalOffsetmethod.