You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vardelta=e.GetPosition(this)-startDragPoint;// Calculate distacne between current mouse point and original mouse down point
102
+
vardelta=ApplyScrollOffset(e.GetPosition(this))-startDragPoint;// Calculate distacne between current mouse point and original mouse down point
98
103
if(Math.Abs(delta.X)>=SystemParameters.MinimumHorizontalDragDistance||Math.Abs(delta.Y)>=SystemParameters.MinimumVerticalDragDistance)// Check it's moved a certain distance
// Guard to ensure that the drag originated from this list box (if from elsewhere, draggedItem will be null)
126
131
if(draggedItem==null)return;
127
132
128
-
vary=e.GetPosition(this).Y;// Y position of the mouse relative to `this` listbox
133
+
vary=ApplyScrollOffset(e.GetPosition(this)).Y;// Y position of the mouse relative to `this` listbox
129
134
panel.DropIndex=CalculateDropIndex(y);// Calculate the index that the item would be inserted if the user dropped here (and pass to panel for rendering)
130
135
panel.DraggedY=y;// Also pass the relative Y coordinate to the panel, also for rendering
0 commit comments