Strange Drag and Drop Behaviour

Sep 25, 2009 at 2:25 PM


   I wonder if any of you have seen this behaviour before when using drag_and_drop:


  1. Call drag_and_drop(source, destination)

  2. Mouse pointer moves to source and method blocks

  3. If you phsyicaly touch the mouse, the method comes to life and the drag and drop happens successfully

  If anyone has solved this, I'd be very grateful to know how.  The application is a WPF app.


Sep 27, 2009 at 3:35 PM

can you provide some sample code for it.

Sep 30, 2009 at 8:58 PM

I will get this to you when I get into the office tomorrow.

Some other facts that might effect this:

1. I'm actually using IronRuby to access the White API

2. At the time, I was experimenting in interactive mode using the IronRuby interpretter



Oct 6, 2009 at 5:43 PM

I'm tried this out again without being in interactive mode and it works.

Thanks :)

Nov 25, 2009 at 5:32 PM
Edited Nov 25, 2009 at 5:36 PM

I have noticed the same behavior in WPF for drag-n-drop.

We fixed it by forcing the mouse to move on a different thread, very ugly, but it works.


Thread hack = new Thread(() =>


Mouse.Instance.DragAndDrop(item, target);

I'm running windows 7 x64 enterprise and my tests are executing via MS Test, though we can repeat the problem on Vista 32bit


Nov 27, 2009 at 8:53 AM

Wow, that's genius.  I'll try it out. Thanks :)