Drag an item from WebView to outside of UWP app

Viewed 119

I have a C# UWP app which consists of a WebView, and I want to let the user drag an element from inside the WebView, to outside of the UWP app.

More technically, I want to transfer the control over the drag operation from the WebView to the C# code of the UWP app itself. The reason is that the WebView can't access the full data that's required for the drag&drop operation to be completed.

Using my own implementation, the WebView can notify the C# code about drag operation being started, but I still need to delegate the control over the drag operation itself from the web code into C# code. I've tried to use startDragAsync but then the event handler for DragStarting (along with DropCompleted) is fired only when the drop (originated from the WebView) is done.

Is there any way in which the C# code could be notified when there's a start of a drag in the WebView, and gain control over it?

0 Answers
Related