Q:

Bind DataGrid's PreviewDrop to a command property

I have 2 datagrids in my UI which lists vehicles. Both DataGrids are exactly the same except they maintain 2 different ObservableCollections.
I created a VehicleListViewModel which contains an ObservableCollection property and different ICommand properties. So I have DataGrid1's DataContext set to the first instance of VehicleListViewModel (ViewModel1) and the 2nd DataGrid's DataContenxt to the second instance (ViewModel2).
Now, I need to implement the PreviewDrop for both datagrids. I want to have the code for this inside the ViewModel as well and not in the code-behind. However, setting PreviewDrop="xxxxxx" only allows the event handler to be defined within the code-behind. Does anyone know a way to do this?

A:

EventToCommand Behavior:
EventToCommand 
Place this on your datagrid and bind it to a command property in your viewmodel.

