rodriwasabi / gong-wpf-dragdrop

Automatically exported from code.google.com/p/gong-wpf-dragdrop
0 stars 1 forks source link

Display drag adorner on none drop target #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Declare a DragAdornerTemplate on drag source
2. Drag item onto an area that doesn't support drop
3.

What is the expected output? What do you see instead?
I'd expect the drag adorner to still be displayed but it doesn't.

What version of the product are you using? On what operating system?
0.1.2

Please provide any additional information below.

Original issue reported on code.google.com by mitchell...@gmail.com on 12 Feb 2010 at 11:16

GoogleCodeExporter commented 8 years ago
I've had a pick through the code and found a section that has the condition 
dropInfo.Effects != DragDropEffects.None. Here you're not creating the adorner. 
I 
assume this was a design decision. 
Do you think there is an argument for adding an Adorner for when an item cannot 
be 
dropped on a target? Maybe even use an adorner instead of the standard DragDrop 
cursors. Windows 7 has this sort of effect when you drag a file around.

Original comment by mitchell...@gmail.com on 12 Feb 2010 at 11:35

GoogleCodeExporter commented 8 years ago
Yes, I agree that this behaviour would be more desirable than the current 
behaviour. I 
will attempt to add this when I next get a bit of time to work on the framework.

Original comment by gro...@gmail.com on 15 Feb 2010 at 7:25

GoogleCodeExporter commented 8 years ago
btw, patches gratefully accepted ;)

Original comment by gro...@gmail.com on 15 Feb 2010 at 7:27

GoogleCodeExporter commented 8 years ago
How would I go about submitting a patch. I've downloaded the source using SVN 
so do I 
just make a change and then check it in for you to review? I've only been using 
WPF for 
a few month so I'd definitely recommend you check anything I put in ;)

Oh, and thanks for doing this project. Its been a great help!

Original comment by mitchell...@gmail.com on 17 Feb 2010 at 8:32

GoogleCodeExporter commented 8 years ago
I've made a whole bunch of changes to my version to make it look a bit sexier. 
Let me 
know what you want me to do. Should I create a new branch and put my changes 
there, or 
should I just commit my changes to the repository?

Original comment by mitchell...@gmail.com on 17 Feb 2010 at 3:14

GoogleCodeExporter commented 8 years ago
If you could add your changes to a branch, that would be great! I've added you 
as a 
committer for the project. I'll take a look and merge the changes into trunk. 

Thanks!

Original comment by gro...@gmail.com on 17 Feb 2010 at 6:37

GoogleCodeExporter commented 8 years ago
Ok, I've created a new branch called 'Jon' and added my changes to it. 
Hopefully it 
should all work. (Well, it works on my machine anyway...) Saying that, its 
probably a 
good idea for you to have a good look as my WPF is a bit shaky at best and I'm 
sure 
I've committed some horrible sin somewhere in there.
Feel free to criticise as long as you don't use the words 'idiot' or 
'useless'... :)

Original comment by mitchell...@gmail.com on 18 Feb 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by gro...@gmail.com on 4 May 2010 at 4:50

GoogleCodeExporter commented 8 years ago
if still relevant (or anyone else is interested) you could remove this if 
clause (incl else):

if (dropInfo.Effects != DragDropEffects.None)
{[...]}
else {DragAdorner = null;}

in DropTarget_PreviewDragOver()-method of DragDrop.cs

it will make show the DragAdorner permanently when dragging over the containing 
ItemsControl and only the mouseCursor will indicate if a drop is possible or 
not.

Hope it helps. Great work, btw! :)

Original comment by josef.he...@gmail.com on 7 Mar 2011 at 11:48

GoogleCodeExporter commented 8 years ago
i think i haven't expressed myself unambiguous. so just to clarify, remove just 
the surrounding clause, not the content ;-)

Original comment by josef.he...@gmail.com on 7 Mar 2011 at 11:57