ContentReceptor? PasteTarget? Placeholder control for receiving paste/drag-n-drop text/image content #499
michael-hawker
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Simple Icon File Maker has a UI that could benefit from this idea! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Link to some API docs: https://learn.microsoft.com/en-us/windows/uwp/app-to-app/ Wonder if the share out/in contracts could be useful to integrate somewhere here as well? @niels9001? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
A relatively common task (albeit difficult to implement properly across UWP and WinUI 3 apps) is allowing users to paste content from their clipboard, especially an image, into an application. Or drag-n-drop a file into the app as well (or from another location in their app).
Idea
By having an easy drop-in-place control that can represent a target area for a user to drag a file to or paste an image into, it can enable a wide-variety of scenarios and input into an application, while abstracting away the nuances of how to get various data from different places.
The control should provide a nice default style and look-and-feel, but also be flexible to encompass being used as a wrapper around other content and directing content to other locations (possibly via events that the developer uses?)
Open Questions/Thoughts
AllowDrop
andAllowPaste
?AllowImage
,AllowText
, etc... Maybe better to have as an enum for allowed content types? Maybe they're flags so it can beAllowableContent="Image,Text"
?ReceivedImage
,ReceivedText
,ReceivedFile
which just provides nice callbacks when content is pasted or dragged (i.e. 'received') by the control and provides the content directly as a string,BitmapImage
, andStorageFile
?In general, I like the idea of this control and see a lot of potential, but think there's a fine-line in scoping we need to hit in aggregating these types of operations and simplifying in/out-of-app communication and preview/display of the result, etc...
Beta Was this translation helpful? Give feedback.
All reactions