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://www.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