Pergunta

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)
Foi útil?

Solução

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top