Skip to main content

avalonia-drag-drop-files

Estrellas13
Forks0
Actualizado3 de junio de 2026 a las 20:05

Wire file drag-and-drop into an Avalonia 11 view so users can drop files onto a window or control. Use when adding a drop a file here zone to an Avalonia app, when a drop handler never fires, when migrating from Avalonia 10 drag-drop, when reading the local paths of dropped files, when filtering dropped files by extension, or when showing visual feedback while dragging over a target. Covers enabling AllowDrop, handling the DragOver and Drop routed events, why DragOver must set DragEffects or Drop will not fire, reading dropped items via DataFormats.Files and IStorageItem.TryGetLocalPath (replacing the removed FileNames API), handling multiple files, and delegating to the view model so logic stays out of code-behind. Triggers on Avalonia drag and drop, drop files, AllowDrop, DragDrop.DropEvent, DragOver, DataFormats.Files, GetFiles, TryGetLocalPath, drop handler not firing, drag drop not working, drop a file onto the window.

Instalación

Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.

SKILL.md
readonly