Drag and Drop any content from a .NET MAUI application
Dropping files into an app is the common case. This article goes the other way: Vladislav extends his MauiPaint sample so the drawing can be dragged onto the desktop and land there as an image file.
The Windows implementation sets CanDrag on the element and, in DragStarting, builds a streamed StorageFile from the image stream so the item is copied when it’s dropped. On MacCatalyst, a UIDragInteraction and a UIDragInteractionDelegate return the drag items from GetItemsForBeginningSession. A pair of extension methods then wraps the platform code, so a single RegisterDrag call on a control is all the shared code needs.
If you’re building a desktop-friendly MAUI app that produces something users want to save or share, such as an exported image, this is a short, practical starting point.