Can't you just handle the ScrollViewer.ScrollChanged
event? From the linked page, it says that it...
Occurs when changes are detected to the scroll position, extent, or viewport size.
So you could just start a DispatcherTimer
to wait for a short instant each time the event has been raised, eg. when it is scrolling. When the scrolling stops and the event stops being raised, then the Tick
handler will be called and you can do whatever you like in it. Try something like this:
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 0, 0, 250);
timer.Tick += Timer_Tick;
...
private void ScrollChanged(object sender, ScrollChangedEventArgs e)
{
if (timer.IsEnabled) timer.Stop();
timer.Start();
}
private void Timer_Tick(object sender, EventArgs e)
{
timer.Stop();
// Do what you want now that scrolling has stopped
}