This is a migrated thread and some comments may be shown as answers.

get the mouse position while dropping

3 Answers 120 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
iven
Top achievements
Rank 1
iven asked on 02 Jun 2009, 02:14 PM
Folks,

I want to drag an icon and drop it on an cavas, while dropping I need to get the mouse release position to place the icon, but the (DragDropEventArgs)e.options.MouseClickEvent is not the position which the mouse released. is there any way to get the right position, thanks.

iven.

3 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 03 Jun 2009, 09:08 AM
Hi Iven,

You can use the CurrentDragPoint from the DragDrop options object during drop complete to get the mouse release position. The point is relative to the visual root object. I.e. something like:

var releasePoint = e.Options.CurrentDragPoint

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
iven
Top achievements
Rank 1
answered on 03 Jun 2009, 04:03 PM
Yes, you are right, currentdragposition works, thanks.
0
Felickz
Top achievements
Rank 2
answered on 21 Sep 2011, 04:17 PM
Naming of these variables caused me to have the exact same issue... i am looking for something related to mouse position, so we automatically went to the MouseClickEvent when instead we wanted the drop "LeftMouseUp" event aka CurrentDragPoint in this case

Tags
DragAndDrop
Asked by
iven
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
iven
Top achievements
Rank 1
Felickz
Top achievements
Rank 2
Share this question
or