Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2150
Change in behavior with drag/drop from 16.1 to 17.2 (DragSnapshotElement)
posted

We've observed a change in behavior with WPF drag/drop after upgrading to 17.2 from 16.1.

There used to be an easy way to create a DragSnapshotElement from scratch, and assign it to the Drag/Drop manager for display while dragging.

However, now in 17.2 the element is not appearing anymore.  I'm not sure if this is expected behavior or not.  I've seen conflicting statements about whether the element that is used in the DragSnapshotElement needs to already be present in the visual tree.

Here is an example where the element assigned to DragSnapshotElement was NOT already in the visual tree:

https://es.infragistics.com/help/wpf/drag-and-drop-framework-ig-drag-and-drop-framework-events

That is basically the scenario we were using, and it no longer works.  We are on 17.2 service release 2188.

Attached is a full example.  If you try to drag the "Drag Me" textblock over the target, you will not see the snapshot while dragging.

You can edit the section labeled "CHANGE THIS CONDITION" to switch the snapshot to something that is in the visual tree, and that seems to work.

WpfDragStartTesting.zip

Any pointers would be appreciated.  I had seen some notes in the volume releases about "Drag and Drop Framework Bug Fix" but none of them implied that the snapshot behavior would change.

Thanks, David

Parents
No Data
Reply
  • 29105
    Offline posted

    Hello David, 

    I tested both 1000 and 2188 and I see the same behavior. Please see the following screenshots taken from 2188. Keep in mind the icon does change, in both versions, from a "X" to a "Hand" when pressing down on the left click between "Drag Me"  to "Target". The Red will also turn back white/red depending on whether or not the mouse left the "Target" in both versions. 

    If there is a specific event not firing, I'm not seeing it. If the behavior matches up but there is some additional step I missed please list your exact steps. 

    Let me know if you have any questions.

Children