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

DragDropEventArgs.DragDropOptions -> CurrentDragPoint but no GetPosition method

2 Answers 87 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Diego
Top achievements
Rank 1
Diego asked on 18 Sep 2009, 02:25 PM
Hi to all,
i'm using RadDragAndDropManager to make possible to drag a TreeViewItem to a MindFusion Wpf Diagram...to make the game more complex we use the AvalonDock component to handle dock interface.
Actually all the staff work quite well but i have a problem about the DragDropEventArgs and the mouse position. i don't find a way to get the correct mouse coordinate when i drop the treeviewitem into the diagram. On many other event args as for example MouseButtonEventArgs i could get the correct position using the method: e.GetPosition(diagramInstance)...but i don't find a way to do it with the DragDropEventArgs.

Any advice?

Really thanks.
Diego




2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 18 Sep 2009, 02:39 PM
Hello Diego,

Yes, currently you do not have the GetPosition method.

You can use the e.Options.CurrentDragPoint to get the position of the mouse with relation to the window in which the DragDrop occurs.

If you want to get the mouse position with relation to an element, you can transform this element (element.TransfromToVisual(currentWindow).Transforn(new Point()) with relation to the window and substract the two points.

Do you think this will work for you?

Regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Diego
Top achievements
Rank 1
answered on 18 Sep 2009, 02:52 PM
Really thanks!
It works!

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