IDropTarget interface Core
A control that takes drags (ControlHost.BeginDrag). While a drag is under way, the host asks the nearest target among the control under the pointer and its parents - the next one up when it refuses. All calls come on the UI thread with absolute coordinates.
Invariants. IDropTarget.DragOver may be called on every pointer move and must be cheap; a target shows its own feedback (an insertion line) and repaints itself. IDropTarget.DragLeave comes once when the pointer leaves a target that was over, or the drag ends anywhere but on it; IDropTarget.Drop comes only after a IDropTarget.DragOver that answered true, and no IDropTarget.DragLeave follows it.
public interface IDropTarget
- Namespace
- ArionUI.Presentation.Controls
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease
Methods
DragLeave
void DragLeave(DragData data);The drag left this target or ended elsewhere: take the feedback away.
DragOver
bool DragOver(DragData data, LogPoint p);The drag is over this target at p: true when it would take it there (and shows where), false when it refuses.
Drop
void Drop(DragData data, LogPoint p);The drag was released over this target at p, which accepted it.
WouldTake
bool WouldTake(DragData data);Whether the target would take data somewhere, asked without a place and without showing anything: a scrolling panel around it scrolls for a drag only then, and a target near the pointer is offered the drag only then. True by default.