Pregunta

I made a Behavior Drag Drop Beahvior which take a Collection (Implementing IList like ObservableCollection,LIst)

And its working alrght...

but if I Use CollectionViewSource.View (in the Xaml Binding), the behavior falis....

How could I make this behavior Generic (LIke independent of type of DataSource attached to DataGrid)

Is it even possible as I am using methods for IList interface like

Insert(object item)
¿Fue útil?

Solución

This problem already has an open source solution, see Wpf Drag & Drop behaviour. This behavior will implement drag drop for any ItemsControl, it should work for datagrid too.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top