UWP C# app: Trouble doing drag and drop from home folder

Fiederer, Jens JF 20 Reputation points
2025-02-07T16:25:00.2166667+00:00

I am working on a UWP app. I have implemented an event handler such that if you drag a PDF file onto our main page, we begin to process that document. This appears to work fine, so I'm pretty sure we are setting things up reasonably.

The exception? The "Home" folder has 3 sections: Recommended, Favorites, and Recent. When I try to drag a file from one of those sections (I have tried all 3) I can get the DragEnter event to fire as usual, but the Drop event never fires. The very same file, when I drag it from its real folder in the file system, drops just fine, and my app processes it perfectly.

Is this maybe a matter of trying to drop a shortcut instead of a real file? Is there something I can do to make this function?

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,308 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Fiederer, Jens JF 20 Reputation points
    2025-02-07T16:26:40.2733333+00:00

    Solved this...in my DragEnter handler I was setting the AcceptedOperation to Move...but it was originally set to Move|Copy|Link, and thus I was locking myself out of handling the linked operation.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.