Hi,
I'm trying to use the drop manager in our MVVM WPF application, and when I try to add a DragStart or DragDrop event I keep getting the error message that the method must be part of the code behind.
This, of course, would break our MVVM pattern to put code in the code-behind of the view. Is there a workaround, and do you intend to support MVVM in the future?
Thanks.
drop manager is not part of the visual tree, so there is no normal way to bind to view model property.
only workaround i found for me is to use freezable data context proxy:
<ns:BindingProxy x:Key="BindingProxy" Data="{Binding}"></ns:BindingProxy>
and
<command:EventToCommand Command="{Binding Path=Data.DragStartCommand, Source={StaticResource BindingProxy}}"
hope this helps.