private void DragScroll()
{
if (this.dragScrollDelta != 0)
{
double scrollRatio = this.scrollViewer.ViewportHeight / this.scrollViewer.RenderSize.Height;
double adjustedDelta = this.dragScrollDelta * scrollRatio;
double newOffset = this.scrollViewer.VerticalOffset + adjustedDelta;
this.scrollViewer.ScrollToVerticalOffset(newOffset);
this.Dispatcher.BeginInvoke(() => this.DragScroll());
double dragItemOffset = Canvas.GetTop(this.dragIndicator) +
((TranslateTransform)this.dragIndicator.RenderTransform).Y +
this.dragIndicator.Height / 2;
this.UpdateDropTarget(dragItemOffset, true);
}
else
{
VisualStateManager.GoToState(this.scrollViewer, ReorderListBox.ScrollViewerNotScrollingVisualState, true);
}
}