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)
有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top