Drag and Drop #6218
Unanswered
renrutsirhc
asked this question in
Q&A
Drag and Drop
#6218
Replies: 1 comment 1 reply
-
|
Hi @renrutsirhc, have you learned anything more about this? Were you able to achieve what you set out to do in the end? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm trying to implement a drag and drop solution with an adorner to show the listboxitem being dragged between two different listboxes. To do this, I'm using events from the usercontrol that contains both listboxes:
So far so good and the dragging the item around is working nicely.
So now I want to make this into a proper drag and drop operation so I call await DragDrop.DoDragDrop() from the PointerMoved event just after the method that moves the adorner layer listboxitem. Now, I get the drag effects etc. on the mouse pointer indicating where I can drop but the listboxitem doesn't move any more. On closer inspection, the pointerover event is not firing when the mouse is moved while executing a dragdrop operation.
I then tried calling the adorner listboxitem moving method from the dragover event instead of the pointermoved event - this works to a point - as long as the mouse is over a control that has AllowDrop set, the adorner listboxitem's position is updated. However, when the mouse is over whitespace (such as the stackpanel containing the two listboxes), the dragover event doesn't fire and so the adorner listboxitem's position is not updated.
Can anyone suggest where I might be going wrong with this or if there is another approach I can try?
Thanks so much!
Chris
Beta Was this translation helpful? Give feedback.
All reactions