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

DragCue On Native Dragging

3 Answers 37 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 10 Dec 2010, 04:09 PM
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?


Travis

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 15 Dec 2010, 10:38 AM
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.

Greetings,
Tsvyatko
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Pearl
Top achievements
Rank 1
answered on 22 Mar 2014, 12:43 PM
Hi,

        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
0
Kalin
Telerik team
answered on 24 Mar 2014, 08:29 AM
Hello Pearl,

You can check the following example from our online demos:
http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid

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.

Regards,
Kalin
Telerik
 

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.

 
Tags
DragAndDrop
Asked by
Travis
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Pearl
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or