DragCue On Native Dragging

4 posts, 0 answers
  1. Travis
    Travis avatar
    8 posts
    Member since:
    Nov 2010

    Posted 10 Dec 2010 Link to this post

    I have dragging working functionally (dragging from inside the application and from an external application), but I cannot for the life of me get the DragCue to show up when dragging from outside the program (it works fine when dragging items around the same application).  What I realized is the DragCue is null inside the DropInfo event when dragging items from external programs.  I tried to hook the DragInfo event (as shown in the WPF GridView Reorder Rows sample) to manually create the DragCue item, but this event is never fired for externally dragged items.  As a last attempt, in the DropInfo event I created a DragCue item if it is null, but it is never displayed.

    Is there a way to show the DragCue for externally dragged items?

  2. Tsvyatko
    Tsvyatko avatar
    863 posts

    Posted 15 Dec 2010 Link to this post

    Hi Travis,

    Unfortunately, this feature is not supported. One of the main reasons are due to the fact that when dragging from external program in ours the events such GiveFeedback and QueryContinueDrag are not raised from OleDragDrop. Thus, in this scenario there is not reliable way to position drag cue according to the current mouse position.

    However, I can suggest the following solution:

     - Set RadDragAndDropManager.AllowDrop to true of the root visual of the window.
     - Attach to DropQueryEvent of the root visual of the window and use AdornerLayer to draw the drag cue in it (using e.Options.CurrentDragPoint for current mouse position).

    Note that this solution will be able to display drag cue only within the boundaries of the window.

    If you have any further questions do not hesitate to contact us.

    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. Pearl
    Pearl avatar
    3 posts
    Member since:
    Aug 2013

    Posted 22 Mar 2014 in reply to Tsvyatko Link to this post


            I need to do drag and drop between RadGridView and RadTreeView.
            Is that possible to do? 
            If so, please let me know some suggestions and practical examples for the same.

    Thanks in Advance
  4. Kalin
    Kalin avatar
    1353 posts

    Posted 24 Mar 2014 Link to this post

    Hello Pearl,

    You can check the following example from our online demos:

    The link is for Silverlight but you can find the same example for WPF in our demos for WPF. What I can also suggest is to check the DragDropBehavior article from our online help documentation as the implementation of the example uses custom DragDropBehaviors.

    Hope this helps.


    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

Back to Top