WPF horizontal scrollbar is slow and doesn't move to click
I'm making a custom control which has a scrollviewer that can display "long" data horizontally. Think something like a video editor, or a timeline type control. I noticed two issues:
1. If the scroll area is large, I can't click/hold/drag the thumb very far. I have to keep doing it over and over and move it a little bit each time.
2. I can't click on the space between the thumb and and another part of the scrollbar to move the thumb to where the cursor is.
3 Replies
here's relevant code behind:
Relevant code-behind of the control for zooming/panning/scrolling. Some of it might not be necessary but wanted
here's a gif showing the problem

hmm, commenting out the mouse events fixes the first issue. i'm guessing its' in the PreviewMouseMove event. I allow them to pan by holding/dragging directly on the canvas, but that affects the scrollbar.
oh, I need to move those preview mouse events to the stackpanel, not the scrollviewer