I'm writing a user control in WPF which is based on a ListBox. One of the main pieces of functionality is the ability to reorder the list by dragging the items around. When a user drags an item I change the items Opacity
to 50% and physically move the item in an ObservableCollection
in my ViewModel depending on where the user wants it. On the drop event I change the Opacity
back to 100%.
The problem I've got is that if the user drags the item off my control and drops it somewhere else then I need to change the Opacity
back to 100% and move the item back to where it was when the user started the drag. Is there an event I can handle to capture this action? If not is there any other cunning way to solve this problem?