How about subscribing to the ScrollViewer.ScrollChanged event on the DataGrid's ScrollViewer? The event arguments for it are pretty extensive, describing how much the ScrollViewer moved and what its new Vertical offset is. Also, according to MSDN:
If CanContentScroll is true, the values of the ExtentHeight, ScrollableHeight, ViewportHeight, and VerticalOffset properties are number of items. If CanContentScroll is false, the values of these properties are Device Independent Pixels.
CanContentScroll is indeed the case for the ScrollViewer for a DataGrid.
All you have to do is find the ScrollViewer:
ScrollViewer scrollview = FindVisualChild<ScrollViewer>(dataGrid);
using an implementation of FindVisualChild that can be found in various places (like here: Finding control within WPF itemscontrol).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…