Here's my suggestion: on DragStarting, add a custom object to e.Data.Properties.
Then, on DragEnter, get that object from e.DataView.Properties. Cast it to your object type. Then do whatever you want with it.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have UWP app in which I want to allow the user to be able to drag an element, and when the element is dragged over another element (DragEnter), I want to change the target, and when they leave (DragExit), I want to change it back. To do this, I am storing the data about the item being dragged in args.Data.Properties during the DragStarting event. Then in the DragEnter event I use this data & attempt to temporarily store the data from the target element in e.DataView.Properties. However, this does not work because e.DataView.Properties is readonly. How can I modify the data in e.DataView.Properties during DragEnter & DragExit? Thanks.
Here's my suggestion: on DragStarting, add a custom object to e.Data.Properties.
Then, on DragEnter, get that object from e.DataView.Properties. Cast it to your object type. Then do whatever you want with it.