Hi,
Thank you for sharing the details and the screenshot. Based on the provide information, we understand you're implementing a drag feature using a Thumb and a DragVisual placed in an Adorner over a TextBox. You've observed that during dragging, the distance between the mouse pointer and the drag preview increases.
We’ve created a simplified sample based on your description and were able to reproduce the reported behavior using the standard WPF TextBox control. This confirms that the issue is not specific to the IntegerTextBox control.
In our sample, the Thumb is placed to the right of the TextBox and acts as the drag handle. When the user clicks and drags the Thumb, a semi-transparent drag visual appears and follows the mouse pointer using e.GetPosition(window) for precise alignment. The original TextBox remains hidden during the drag and is moved to the drag visual’s final position once the drag completes. This setup ensures the drag visual stays synchronized with the mouse and avoids cumulative offset errors.
We’ve attached a sample project and a demo video for your reference. Please review them and let us know if we’ve misunderstood any part of your requirement. If possible, kindly share a modified sample or a video from your end to help us better understand and address the issue.
Regards,
Karthick Arjunan
Attachment:
DraggingDemo_dfef30eb.zip