What steps will reproduce the problem? 1. Create two windows with ItemsControls 2. Try to drag and drop an item from one window to the other
What is the expected output? What do you see instead? I expected the adorner to appear in the second window, but it isn't.
What version of the product are you using? On what operating system? 0.1.2
Please provide any additional information below. Hello, first I wanted to say that i like your lib. It is simple and works like a charm. Anyway, in my application I have floating windows with base data in it and I need to drag and drop it to the main area.
But, because you use the "m_DragInfo.VisualSource" to determine the adorner layer, the adorner isn't rendered on the second window (adorned layer of the first window is used).
I have an easy solution for this:
instead of:
static void DropTarget_PreviewDragOver(object sender, DragEventArgs e) { ... CreateDragAdorner(); }
you could use the sender of the event to determine the adorner layer:
static void DropTarget_PreviewDragOver(object sender, DragEventArgs e) { ... CreateDragAdorner(sender as UIElement); }
then you need just to use that element to determine the adorner layer:
static void CreateDragAdorner(UIElement sender) { ... Window parentWindow = sender.GetVisualAncestor<Window>(); }
For me it works!
What do you think about that?
Thank you, Cheers, Andreas
Comment #1
Posted on Jul 4, 2010 by Helpful KangarooI think this is the same issue as #11. If so it was fixed in SVN. Could you try using the SVN version and re-opening the issue if it's still a problem for you?
Comment #2
Posted on Mar 23, 2011 by Happy DogI downloaded the framework a month ago, and had the same problem. Andreas solution worked, so thumbs up Andreas!!! :) But this issue should be reopened again I think.
Great drag and drop framework guys, I use it all over my WPF programs now :)
Status: Duplicate
Labels:
Type-Defect
Priority-Medium