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

Design question #12

Closed
punker76 opened this issue Feb 18, 2013 · 4 comments
Closed

Design question #12

punker76 opened this issue Feb 18, 2013 · 4 comments

Comments

@punker76
Copy link
Owner

Original author: mitchell...@gmail.com (May 05, 2010 09:27:51)

Hi Grokys. Looks like its getting busy on the drag and drop front!

Anyway I've been playing around on my branch of the code. One thing that
I've needed to change is the events from the 'Preview' versions to the
standard event version. i.e. Switching the events from tunnelling to
bubbling.

This change means that I can put nest controls that all support drag and
drop. (I think this is also the issue that FreakOnALuis is getting when
using a slider on a draggable element.)

So my question is what was the reason for picking the tunnelling event? So
far I haven't found any issues with making this change but just because I
haven't found anyway doesn't mean there aren't any. Am I missing something?

Thanks,

Jon

Original issue: http://code.google.com/p/gong-wpf-dragdrop/issues/detail?id=12

@punker76
Copy link
Owner Author

From gro...@gmail.com on May 06, 2010 09:23:35
Hi Jon,

I mainly used them because all of the examples I was working from used them! However, the
tunnelling events get called before the bubbling events, so using the PreviewX events ensures
that library code is called before any user code, which is usually the desired behaviour.

However, judging from yourself and FreakOnALuis' issues, it looks like this is not the correct
behaviour for this library. So you're welcome to try changing it around on your branch: let me
know how it works out for you.

(You may also want to merge recent changes from trunk into your branch, btw)

@punker76
Copy link
Owner Author

From gro...@gmail.com on May 06, 2010 09:24:26
Out of interest: why have you found the need to move to bubbling events?

@punker76
Copy link
Owner Author

From mitchell...@gmail.com on May 06, 2010 09:59:51
There are two reason.

Firstly, I wanted to support the drag effect adorners on my whole application. To do this I
implemented the IDropTarget interface on the main forms ViewModel and set the drag effect to
None. This works great until you try and drop something on a control that should support
dropping. Because the tunnelling event starts with the top of the visual tree the main form
handles the drop and therefore you can't drop anything.

Secondly, I've got a control that I need to support drag and drop which I want to put in a
list item which supports the drag reordering. It might sound a little weird but it does make
sense in the context of application... honest!

The only issue I have found, which I'm not sure is because of the events used, is that I've
got a text box on a list item and when I try to select the text by doing a drag selection the
list item starts to be dragged. Not too sure why its happening, but I can live with it for the
moment.

punker76 pushed a commit that referenced this issue Apr 5, 2013
Slider in list item can't be changed. DD thinks the list item is being
dragged.
Text box on a list item: when I try to select the text by doing a drag
selection the
list item starts to be dragged.
@punker76
Copy link
Owner Author

punker76 commented Apr 5, 2013

text box issue will be published in 0.1.3.7

@punker76 punker76 closed this as completed Apr 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant