Reputation: 51
I have a Touch Screen enabled application and i want to do some drag-drop using the touch events instead of mouse events. The problem is that DragDrop.DoDragDrop returns DragDropEffects.None when I trigger the drag-drop action from a touch event (touch down and touchmove combination).
With the mouse events everything works as expected.
I have no exception raised, and using the Surface toolkit is not an option.
Upvotes: 3
Views: 1885
Reputation: 51
Well, as one of the other peoples that had the same problem, i solved it myself with a workaround.
On short, this is: 1.I had to add a handler for QueryContinueDragHandler in DragDrop. While the monitored touch is active the operation is Continue, otherwise Drop 2.On a preview touch move set on a toplevel container I had to mimic the cursor movement using some pinvoke (SetCursorPos in Win32 API)
I wish a better solution exists.
Upvotes: 2