Drag visual implementation approaches #17609
Unanswered
stevemonaco
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Doing a bit more experimentation and the UWP drag visual works outside of the app's bounds, too, which is a nice bonus. So that leads me to scenario I forgot: custom cursors that contain the drag visual rendered into the cursor itself. Which would eliminate these issues, but I'm not sure Avalonia would cooperate here as cursors during drag operations appear to wholly depend upon |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Avalonia lacks specific APIs to show drag visuals. By "drag visual", I mean content created from the drag source that follows the cursor to indicate what content will be dropped whether as text or a bitmap render. UWP has an API (
DragUI
andDragUIOverride
) to support this. See below for an captured example from this sample:There are a few aspects I'm concerned about implementing (in the context of a library, not within Avalonia itself):
DragMove
events withhandledEventsToo
on the Window itself (or all TopLevels)? Currently, I only receive them on top of controls registered for accepting drops.I assume there are some related compositor APIs that might prove useful here, but a good approach is unclear to me.
Beta Was this translation helpful? Give feedback.
All reactions