Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

i got a little problem here with my wpf ui.
There is a drag and drop functionality implemented using the PreviewMouseDown and PreviewMouseMove events on the source list box and the drop event at the target list box.
Now i got the problem, that it fires a System.InvalidOperationException with the message "Dispatcher processing has been suspended, but messages are still being processed.".
That occurs if the item is selected and the user moves the mouse with pressed left button to mark the text to edit it.

How do i know, that an item or the item, which is tried to drag, is in "edit mode" or something like that, so i can disable the drag in the PreviewMouseMove event (don't call DoDragDrop).

i mean something like that "listbox.Item.IsInEdit" so i can do something like this:
if ( ! lbXYZ.Item.IsInEdit)
{
...
DoDragDrop(...)
...
}

any suggestions?
Posted
Updated 20-Nov-13 23:41pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900