Drag Cue Positioning`

3 posts, 0 answers
  1. Charles
    Charles avatar
    15 posts
    Member since:
    Feb 2012

    Posted 08 Mar 2012 Link to this post

    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. Charles
    Charles avatar
    15 posts
    Member since:
    Feb 2012

    Posted 08 Mar 2012 Link to this post

    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!
  3. UI for WPF is Visual Studio 2017 Ready
  4. Nick
    Admin
    Nick avatar
    593 posts

    Posted 08 Mar 2012 Link to this post

    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 >>
Back to Top