This is a normal behaviour of the Scrollbar, it is not inherent to the Xceed Datagrid for WPF. To ensure yourself, you could use the ListBox as follow:
private void btnTest_Click(object sender, RoutedEventArgs e)
{
ScrollViewer sv = Page1.GetScrollViewer( dgcMyData );
ScrollBar verticalScrollBar = sv.Template.FindName( "PART_VerticalScrollBar", sv ) as ScrollBar;
verticalScrollBar.Value = 45; // verticalScrollBar.Value;
}
public static ScrollViewer GetScrollViewer( ListBox listBox )
{
Border scroll_border = VisualTreeHelper.GetChild( listBox, 0 ) as Border;
if( scroll_border is Border )
{
ScrollViewer scroll = scroll_border.Child as ScrollViewer;
if( scroll is ScrollViewer )
{
return scroll;
}
else
{
return null;
}
}
else
{
return null;
}
}
The thumb will no longer move since its value is logically set on the ScrollViewer.
Xceed - Software Developer and Technical Support