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

Drag Cue Positioning`

2 Answers 56 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Charles
Top achievements
Rank 1
Charles asked on 08 Mar 2012, 11:55 AM
I have a large-ish drag cue, and I need to be quite precise about where the drop is going to happen (it's into a RadRichTextBox, so position in the text is important).

Is there any way I can control the position of the drag cue?  At present, the mouse pointer is somewhere in the middle of the control I'm using.  It appears it does something similar in most of the demos, too.  I would like the cue to be drawn with the top left (0,0) starting at the mouse pointer position - then I'd be able to see what is under the mouse pointer.

Any help appreciated!

2 Answers, 1 is accepted

Sort by
0
Charles
Top achievements
Rank 1
answered on 08 Mar 2012, 01:48 PM
If anyone's interested, a workaround that seems to get you pretty much there is setting Margins on the cue object before you assign it, e.g.
dragCue.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
dragCue.Margin = new Thickness(e.Options.MouseClickPoint.X, dragCue.DesiredSize.Height / 2, 0, 0);

Though if there's some way of changing the positioning in the DragDropQueryEventArgs that I've missed, or another better way of doing this, please let me know!
0
Nick
Telerik team
answered on 08 Mar 2012, 02:47 PM
Hello,

You can use the RadDragAndDropManager.DragCuewOffset property to manipulate the position of the drag cue. 

Hope this helps! 

Regards,
Nik
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
DragAndDrop
Asked by
Charles
Top achievements
Rank 1
Answers by
Charles
Top achievements
Rank 1
Nick
Telerik team
Share this question
or