What do you want to see in a better drag & drop API for Windows? #373
Replies: 15 comments 6 replies
-
Irrespective of platform framework, these are some of the things I would expect from a Drag and Drop experience
|
Beta Was this translation helpful? Give feedback.
-
Obviously you already have this on your radar, but for me the most important thing is to make files writable by default, especially if dragged from File Explorer. |
Beta Was this translation helpful? Give feedback.
-
I'll provide some additional historic links (you could simply search for "uwp drag and drop readonly":
Off topic: It feels frustrating to renew these kind of old feature requests. We had uservoice, we had another platform (which was introduced in a build 20xx?) where we could view the status of such feature requests. All got abandoned. Now we have to repost them on Feedbackhub? or Project Reunion. Still I'm hopeful that those kind of issues will get addressed. |
Beta Was this translation helpful? Give feedback.
-
I wish I could say anything better, but here is our best answer for now: We at Microsoft are sorry that we keep changing how we accept and request feedback from you and our other platform developers, and we're sorry that with each change we leave some old ideas and concerns behind even though they may still be live. We're trying to be better about this. (I have personally heard and participated in internal discussions regarding this.) We know you have no good reason to believe that, but even so we ask for your understanding as we figure out the best way we can talk to you. |
Beta Was this translation helpful? Give feedback.
-
@benstevens48 you might want to check out microsoft/microsoft-ui-xaml#2421. |
Beta Was this translation helpful? Give feedback.
-
My main pain point with the drag/drop API is how hard it is to provide a proper drag image from a Windows Forms app, since the default WinForms IDataObject cannot properly communicate with the internal Windows drop subsystem. This means I will need to rewrite a lot of code to enable use of the |
Beta Was this translation helpful? Give feedback.
-
Thank you everyone for the informative feedback so far!
This is actually one of the exact scenarios we want to be enable in Reunion. Windows Forms uses the older drag & drop mechanism involving IDataObject which is harder to work with. In Reunion, we hope to provide an API for any app with an HWND or CoreWindow/AppWindow to call into the "modern drag & drop" implementation, how Windows.UI.Xaml et al do it, without an assumption on the GUI framework.
Thank you for highlighting this issue. We understand this is a request from a lot of developers; we will do our best to appropriately prioritize it for Reunion as well an update to the API in the Windows SDK.
This a great list of the features of a delightful drag & drop experience, thank you for sharing that. FWIW, a lot of these are already provided by Windows' modern drag & drop experience as mentioned above. We hope to expand modern drag & drop to be accessible by all Windows apps via Reunion; and make it easier to use. |
Beta Was this translation helpful? Give feedback.
-
@Ram-G : what's the next step for your team with this (e.g., project proposal?) |
Beta Was this translation helpful? Give feedback.
-
@stevewri We have a draft API spec out for review here #141! |
Beta Was this translation helpful? Give feedback.
-
I just found that in Win32 apps you can't drag files from non-elevated app to elevated app. |
Beta Was this translation helpful? Give feedback.
-
Supporting on-demand drag and drop operations from storage item pathsIn my app scenario, we avoid creating a This alone makes reliable dragging of storage items into another app unreliable. We are forced to generate many storage items depending on a user's selection. When they try to drag them outside the current window, there is a high risk of failure because it takes longer than the duration of the drag gesture to load all 50+ or so storage items. For these reasons, it would be desirable to have a method on
which would have the operating system handle generation of storage items from the paths provided. |
Beta Was this translation helpful? Give feedback.
-
Hi! I am an active user of a very cool third-party application - windows terminal. But this application has a bug, and the developers sent me here to support the topic at the request of the function. The bug: microsoft/terminal#12017 (Cannot move tabs when Terminal is running as Administrator) Apparently, developers need to allow "dragging & dropping XAML elements in elevated applications". There is not and cannot be a single reason to prevent me, the user, from simply taking and moving the application tabs with the mouse. Please implement this functionality for developers. As a last resort, make a warning return - it's bad to do that, etc., I'll calmly forget about this message, say "still give the opportunity to move tabs with the mouse" and I'll feel safe. Don't push security policies to the point of absurdity, please. |
Beta Was this translation helpful? Give feedback.
-
Are there any updates on this? I would like to use the CoreDragDropManager in a win32 app instead of OLE Apis (since they are more memory safe and easier to use/more forgiving). I just looked at #141, which seems to implement exactly what I need, but it hasn't been merged and was since closed. Does anyone here know why it wasn't merged? I think this feature would be really useful and help move along the "modernizing" of windows Apis. |
Beta Was this translation helpful? Give feedback.
-
Get this fixed first? microsoft/microsoft-ui-xaml#9061 and relevant microsoft/microsoft-ui-xaml#8450 |
Beta Was this translation helpful? Give feedback.
-
Sorry, I'm barking at wrong tree here. It's a discussion from 2020. |
Beta Was this translation helpful? Give feedback.
-
Discussion: What do you want to see in a better drag & drop API for Windows?
In a similar vein to other discussion threads (Clipboard in #63), we at Windows are trying to understand how we can improve the drag & drop APIs in Windows as part of Project Reunion. As such, we would love your feedback on drag & drop in Windows -
We are open to your ideas, constructive criticisms, comments, questions, concerns in this thread. We really want to hear them to make it easy for you to build more powerful apps which delight your users!
Examples of bugs / feature requests relating to drag & drop you have raised on our partner XAML team's github which we are tracking internally:
https://github.com/microsoft/microsoft-ui-xaml/issues/2364
microsoft/microsoft-ui-xaml#2421
High-level overview of the drag & drop API surface on Windows
There are a few ways to implement drag & drop in a Windows app today:
If your app uses XAML/WinUI
Detailed blog post: https://docs.microsoft.com/en-us/archive/msdn-magazine/2015/august/windows-10-modern-drag-and-drop-for-windows-universal-applications
Samples: https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/XamlDragAndDrop
If your app is a WPF: https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/drag-and-drop-overview
(For all UWP apps) Via the UWP API: https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.datatransfer.dragdrop.core?view=winrt-19041
(For all classic Win32 apps) Via the OLE drag & drop API: https://docs.microsoft.com/en-us/cpp/mfc/drag-and-drop-ole?view=vs-2019
We understand that this is obviously really confusing. The most modern APIs are 1) and 3), the UWP ones and we expect these to be the foundation for Project Reunion drag & drop. But we want to do better - we want to know what your pain points have been at using any of them, and what you'd like to make things better for your users.
Please respond to this thread to let us know your ideas, and we'll break them off into separate issues/discussions as necessary.
Beta Was this translation helpful? Give feedback.
All reactions