DragDropManager GiveFeedbackHandler always gets DragDropEffects.Copy regardless of target type

2 posts, 0 answers
  1. Scott
    Scott avatar
    31 posts
    Member since:
    Aug 2011

    Posted 22 Apr 2013 Link to this post

    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.
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    641 posts

    Posted 23 Apr 2013 Link to this post

    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.

    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top