In my WPF MVVM (NET 3.5) app I have below button:
<Button AllowDrop="True"
Drop="btnDelete_Drop"
DragEnter="btnDelete_DragEnter"
Content="Delete"/>
The button behavior is the following:
- If some listview items are drag and drop on this button, then some event in the view are raised btnDelete_DragEnter" and "btnDelete_Drop". On drop, the dropped items are removed by calling a method in the view model from the view.
Now, I want to control the click event on the button and I would like to use a Command for only this event.
So my question is:
Is there any way to associate a command only for click event and keep the rest of events as above, through Drop and DragEnter events?
It seems like It can be done using Prism (see here) by importing below reference:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
But my problem here is that it is not compatible with WPF .NET 3.5 ... so any other way to do it without using Prism?