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

DragCue object

2 Answers 76 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Osi
Top achievements
Rank 1
Osi asked on 31 Oct 2008, 02:14 PM
Hello,

How can i get the position of the dragcue object when the dragstatus is on dropcomplete in the DropInfoEvent handler?
I know there is a property CurrentDragPoint, but that's the position of the mouse cursor which is not the same as the position of the dragcue object.

Thanks

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 04 Nov 2008, 09:56 AM
Hi Osi,

Normally you can get the position of any element by TransformToVisual. This is how you get the top left (0,0) point of the DragCue, relative to the root element:

var transform = (e.Options.DragCue as FrameworkElement).TransformToVisual(null);  
var topLeft = transform.Transform(new Point(0, 0)); 

This code will throw an exception in the current release (this actually is a bug in the Popup).  We have fixed this is the Q3 release of the controls (which will be available this week).

Regards,
Miroslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Osi
Top achievements
Rank 1
answered on 04 Nov 2008, 05:53 PM
Yeah, i got the error too. I'm glad it will be fixed in the next release.
Thanks!
Tags
DragAndDrop
Asked by
Osi
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Osi
Top achievements
Rank 1
Share this question
or