I'm searching a way to highlight all supported drop zone in a control, when a drag start (and of course reverse to normal when drag end)... and using MVVM.
Is there something already existing about this use case ?
4 Answers, 1 is accepted
You would need to manually implement such a behavior by using the events of the DragDropManager for WPF. For more details about the events please check the following article from our online help documentation:
Hope this helps.
Hi Dear Tech Support,
I would like to know if you have any sample for the implementation. I am kind of new to this and would appreciate any help from you.
Unfortunately we don't have such a sample prepared. However we will be glad to help you during the implementation - if you have any questions or concerns please let us know.
I'm now implementing the feature, but the only way I find is quite ugly.
On my DropBehavior class (to bind a ICommand to the Control drop event) , I have a static IList<DropBehavior> referencing all the instances of the class (added on OnAttached and removed on OnDetached).
Additionaly, I have a static timer ticking every 250ms, which is checking if DragDropManager.IsDragInProgress has changed. If so, it change the Background of the referenced controls, or restore the initial Background.
Thanks to propose another approach to solve this feature.