Skip to main content

avalonia-drag-drop-files

Étoiles13
Forks0
Mis à jour3 juin 2026 à 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.

Installation

Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.

SKILL.md
readonly