Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added drag/drop #455

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Added drag/drop #455

wants to merge 2 commits into from

Conversation

grokys
Copy link
Member

@grokys grokys commented Sep 12, 2024

As described in #232, the EnableTextDragDrop option did nothing because the code was commented out.

This PR puts the drag/drop back, though there are some limitations compared to AvalonEdit's

  • No support for GiveFeedback/QueryContinueDrag: these are win32 concepts and thus not exposed by Avalonia
  • No support for the DataObject.Pasting attached event: the event does not exist in Avalonia
  • Only supports Text by default

Although DataObject.Pasting is not supported, I added a DataObjectEx.Copying event as I consider being able to customize the copied data vital to this feature: it's been added as DataObjectEx.Copying. The Pasting event could also be added here if needed but it's less important IMO.

Avalonia doesn't have this event, but it's needed in order to customize drag/drop operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant