While dragging a Thumb control, a large and rapid movement that ends suddenly can unpredictably result in a seriously postponed DragDelta event. If the mouse remains motionless with the left button down, the event can be postponed indefinitely, or at least for a few seconds. A second movement of the mouse causes the large missing event to suddenly appear. The event is lost forever if the left mouse button is released before the mouse moves again. This behavior is most apparent when the application is very busy.
You can experience this problem in my quicksort animation. There is a drag bar (thumb) at the bottom of the ScrollViewer containing the source code. Drag it with large, quick vertical motions. End each vertical motion suddenly, but do not release the left mouse button. After a few tries, you will suddenly find your mouse cursor far from the thumb. If you release the left mouse button, the thumb’s position will never be properly updated. On the other hand, if you make another movement of the mouse, the thumb will catch up.
To experience the issue in its full glory, keep the quicksort demo running while you are experimenting. Click the play button if the demo stops.
I have done tests with a specially instrumented version of the quicksort demo to verify that the behavior in question does in fact involve delayed DragDelta events. Yup.
Click on the image below to try your hand at confusing the thumb control.
