I found that the most useful time to call the ScrollIntoView method is the event associated with ScrollViewer.ScrollChanged. This can be installed in XAML as follows:
<DataGrid ... ScrollViewer.ScrollChanged="control_ScrollChanged">
The ScrollChangedEventArgs object has various properties that can be useful for calculating the layout and scroll position (Extent, Offset, Viewport). Note that they are usually measured in row / column counts using the default virtualization settings of the DataGrid.
Here is an example implementation that saves the bottom item in the view, as new items are added to the DataGrid if the user does not move the scroll bar to view items higher in the grid.
private void control_ScrollChanged(object sender, ScrollChangedEventArgs e) {
Matt
source share