1
Vote

DragDropBehavior fails when ItemsSource is an IList<T>.

description

The DragDropBehavior uses IList to control the addition and deletion of items if the ItemsControl.ItemsSource property is set.

The problem arises when the type of ItemsControl.ItemsSource is other than IList..

In my case I've derived a collection from generic IList<T>. Whenever I do a drop on a control i get exception(InvalidOperationException) stating that "Operation is not valid while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead."

comments