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

DragDropManager GiveFeedbackHandler always gets DragDropEffects.Copy regardless of target type

1 Answer 110 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 22 Apr 2013, 10:15 PM
I was trying to switch over to the DragDropManager today as the builds are now showing the previous manager is obsolete. (Moving to 2013 Q1 SP1).

It all looks straight forward as I use DragInitialize to setup for the drag and then watch GiveFeedback to see what DragDropEffects are being passed back by a valid drop target below what I am dragging (cursor).

Put simply, I can drag all over my app's window and see DragDropEffects.Copy always being returned. Except for a few limited cases, e.g., dragging over a standard WPF text box or the app title bar, or a window outside my app. In the latter cases, I get DragDropEffects.None - as expected!

I must be missing something. I have a custom class as the payload being dragged. I even set it so automatic conversions are not allowed. How are the window's in my app returning the DragDropEffects.Copy effect when they should have absolutely no idea as to how to interpret the payload?

Is it because I have mixed old and new drag/drop methodologies? Is this an error on my part, or the new implementation?

I really want the app to show the cursor associated wth DragDropEffects.None until it is over a target that recognizes the payload type.

Any suggestions appreciated.

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 23 Apr 2013, 06:30 AM
Hi Scott,

This is definitely not an expected behavior. The Effects depend on several conditions:
 - AllowedEffects property which is set in DragInitialize handler
 - AllowDrop property of the target - if it is set to false, the effects will be None
 - Effects property of the target, which can be modified in DragEnter, DragOver and DragLeave handlers
Based on the combination of these three conditions, you should modify your drag-drop operation.
Of course this result of incorrect effects could be caused by mixing the two drag-drop managers. As we are unable to reproduce the behavior, is it possible to send us more details for your application - which controls are you using, how do you set drag-drop properties, which events do you handle, etc. A simple project reproducing the problem will be a great help for us.

I'm looking forward to hearing from you.

Regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DragAndDrop
Asked by
Scott
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or