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

Is there an example of using IDragHandler? (need to intercept start of drag operation) #443

Open
RickStrahl opened this issue May 24, 2022 · 2 comments
Labels

Comments

@RickStrahl
Copy link

RickStrahl commented May 24, 2022

It looks like this control supports IDragHandler but there are no examples that show how this works. I've implemented the interface and set IsDragSource=true assigned the data source and I have the events firing but items don't start actually dragging.

My use case is that I want to handle drag operations out of the control into standard DataObject so that I can drop on another control that already handles drop targets seperately (in JavaScript in a WebView control in my case) and that is not have a dd:DropSource.

IOW:

  • Initiate a drag operation with Gong
  • Complete the Drop operation using only standard D&D behavior

In essence I want to take advantage of the nice drag initiation behavior of Gong, but once we're dragging utilize standard D&D behavior on the target.

Is this possible? It seems like it should be since Gong works with standard D&D objects, but I'm not sure.

Reason for not being able to use Gong on the target is that the drag operation is actually picked up in a JavaScript client inside of a WebView - this works fine with standard D&D objects/events.

@RickStrahl RickStrahl added the Bug label May 24, 2022
@Chri-s
Copy link
Contributor

Chri-s commented Jan 31, 2023

Perhaps a bit late, but I created an example repository at Chri-s/DragHandlerSample.
Have a look at CustomTextDragSource.cs and CustomFileDragSource.cs.

@punker76
Copy link
Owner

punker76 commented Oct 9, 2023

@RickStrahl Did you look at the example of @Chri-s ? I think this is maybe what yo need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants