Open bwoebi opened 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I could use this.
Description
Generally, everything which can be present in a clipboard also can be in drag&drop, so I would propose to also directly expose
Microsoft.Maui.Controls.DataPackage
onMicrosoft.Maui.Essentials.Clipboard
.Obviously, this includes being able to fetch images and also possibly files (and maybe rich text?) from the clipboard and the drag&drop interface. As far as I saw in the code, the current drag&drop has ImageSource in its package, but that's only image sources moved around from within the local application.
While drag&drop (from external applications) is not so relevant on mobile, given that MAUI supports MacCatalyst, it would be nice to have a common API for at least Windows&Mac. For the clipboard, it is relevant on all targets.
As a bonus, it would be great to be able to fetch the raw bytes from the ImageSource. (i.e. to actually read and process the incoming data). [Maybe this should be opened as a different feature request?]
Public API Changes
Note that currently DataPackage has no
Is*
properties. I think it's a good idea to do that rather than distinction via null checks (?).Intended Use-Case
I generally need to have access to the commonly available contents of a clipboard & drag&drop. Especially raw clipboard image contents and files to process these, without going through the platform specific APIs for a streamlined coding experience.