public sealed record DesktopDragData : IEquatable<DesktopDragData> The data of a drag out of a window, for IWindowPlatformServices.StartDragAsync.
Remarks
Set at least one of DesktopDragData.Paths, DesktopDragData.Text and DesktopDragData.Uris. The data comes from the application, never from the page: a page asks for a drag through an ordinary command, and the ViewModel builds the data from its own state.
To drag content that has no file yet, write it to a file first and drag the file's path: the desktops render promised content differently, so Runic drags only existing files.
Constructors
DesktopDragData
public DesktopDragData() No documentation.
Properties
AllowedEffects
public DesktopDragEffects AllowedEffects { get; init; } Gets the effects the drop target may choose; DesktopDragEffects.Copy by default.
Remarks
DesktopDragEffects.Move and DesktopDragEffects.Link need DesktopDragData.Paths. With DesktopDragEffects.Move the application deletes what remains of the files when the drag reports a move; a target may already have moved them.
Paths
public ImmutableArray<string> Paths { get; init; } Gets the absolute paths of existing files and directories to drag; at most 1024.
Text
public string? Text { get; init; } Gets plain text to drag, at most 1 MiB (1,048,576 UTF-16 code units) without NUL; null for none.
Uris
public ImmutableArray<Uri> Uris { get; init; } Gets absolute URIs to drag, such as web links; at most 1024.
Remarks
file: URIs are refused: drag local files through DesktopDragData.Paths.