haithambradai / gong-wpf-dragdrop

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

Insertion mark/line #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In DropTargetInsertionAdorner.cs you draw an insertion line where the drop
will take place (when dropped).

I think it is beter to not-draw it when drop is not allowed.

Just change:
 protected override void OnRender(DrawingContext drawingContext)
        {
            if (DropInfo.Effects != DragDropEffects.None)
            {
            ....

Another point is that I want to make use of a TreeView and I think we need
a bit different approach here. There is a distinction between dropping on
an treenode and between nodes. Is it possible to mark (based on a
template?) an item instead of a line in that case? I would suggest a couple
of pixels from the top/left and bottom/right would indicate an insertion
and otherwise a drop on that item. You might ask the DragOver what to do.

What do you think about it?

Frank

Original issue reported on code.google.com by sportfr...@gmail.com on 5 May 2010 at 2:19

GoogleCodeExporter commented 9 years ago
You're right, the adorner shouldn't be drawn when the drop is not allowed.

Does the Highlight adorner not work for you? That is supposed to indicate 
dropping onto 
a node rather than between a node. There is an issue with the highlight adorner 
on 
treeviews at the moment, where it highlights the node and all children rather 
than just 
the node, but I intend to fix that.

Original comment by gro...@gmail.com on 6 May 2010 at 9:27

GoogleCodeExporter commented 9 years ago
Setting the Highlight adorner in DragOver does work!
Thanks for pointing this out

Original comment by sportfr...@gmail.com on 6 May 2010 at 10:39

GoogleCodeExporter commented 9 years ago

Original comment by gro...@gmail.com on 22 Jun 2010 at 10:31