An issue was reported lately that Drag Drop actions on WPF items hangs when using CodedUITest. Attached is the code for my dummy WPF application.Below is what my CodeduiTest looks like:-

// Move 'Item3' list item from (17, 6) to 'listBox2' list box (36, 53)
uIListBox2List.EnsureClickable(new Point(36, 53));
Mouse.StartDragging(uIItem3ListItem, new Point(17, 6));
Mouse.StopDragging(uIListBox2List, new Point(36, 53));

If you run the above CodeduiTest for the application then you will see a hang. This happens because DragDrop freezes the dispatcher to handle any messages and they get into the queue.The Dragging is only identified and starts when you actually start moving the mouse and then the dispatcher starts responding to callbacks. In the process of doing Dragging we do some UIA call on the app which hangs and hence the test hangs.

To workaround this you can modify the above code as :-

int waitForReadyTimeOut = Playback.PlaybackSettings.WaitForReadyTimeout;
Playback.PlaybackSettings.WaitForReadyTimeout = 0;

Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.Disabled;

try
{
    // Move 'Item3' list item from (17, 6) to 'listBox2' list box (36, 53)
    uIListBox2List.EnsureClickable(new Point(36, 53));

    // Get the Bounds of the ListItem that is getting dragged and dropped. 

    int x = uIItem3ListItem.BoundingRectangle.X;
    int y = uIItem3ListItem.BoundingRectangle.Y;
    int w = uIItem3ListItem.BoundingRectangle.Width;
    int h = uIItem3ListItem.BoundingRectangle.Height;

    Mouse.StartDragging(uIItem3ListItem, new Point(17, 6));

    // This will move the mouse a little bit to make Dispatcher work.
    Mouse.Move(new Point(x + (w / 2) + 1, y + (h / 2))); 
    Mouse.StopDragging(uIListBox2List, new Point(36, 53));
}
finally
{
    // Revert the old WaitForReadyTimeout.
    Playback.PlaybackSettings.WaitForReadyTimeout = waitForReadyTimeOut;

Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.UIThreadOnly;
}

If you notice I am moving the mouse after start dragging which makes the dispatcher start responding to the UIA calls.