Drag and Drop is hanging when the large number of files(1500) is dragged and the pointer is released before dropping in Explorer

Amulya 41 Reputation points
2021-09-16T06:05:05.377+00:00

Drag and Drop is hanging when the large number of files(1500) is dragged and the pointer is released before dropping in Explorer

We are performing a dragging of files from UWP and dropping in File Explorer
Where we are using the Foreach loop to get all the 1500 file details required, so when the pointer is released inside the app(without dropping) the foreach loop is still running

Note: The code is written on DragStarting event

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Roy Li - MSFT 32,721 Reputation points Microsoft Vendor
    2021-09-17T07:18:24.027+00:00

    Hello,

    Welcome to Microsoft Q&A!

    @Amulya Break out from the Foreach loop is easy, you could achieve this using the While loop. But there is no way to detect if the drag is canceled by releasing the pointer. The DragItemsCompleted event will only be fired after the DragStarting event is finished. So currently, there is no way to do this.

    Thank you.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments