Closed punker76 closed 11 years ago
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)
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?
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.
text box issue will be published in 0.1.3.7
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