DragDrop between ListViewRows

Nov 19, 2010 at 12:37 PM
Edited Nov 19, 2010 at 2:21 PM


I have a question about Drag&Drop between ListViewRows in a ListView.



"win.Mouse.DragAndDrop(draggedListViewRow, dropListViewRow);"


This function can not make Drag&Drop in my test successful.

Manuel test has no problem.

After selecting a drop list view row, the fouse of dragged list view is lost. I have searched and

found a discussion http://white.codeplex.com/Thread/View.aspx?ThreadId=26678, but I have not found

how to set the attributes.

The other question is why the new position is set in this way. What means "dragStepFraction"?

for ListView, there are always scrollbars and ListViewRow, which is too lang to be clicked with Mouse.LeftDown() and Mouse.LeftUp() in my program.

double newX = startPosition.X + (endPosition.X - startPosition.X) * (dragStepFraction * i);

double newY = startPosition.Y + (endPosition.Y - startPosition.Y) * (dragStepFraction * i);