We are looking for a way to base a WPF trigger in XAML on whether we are performing a drag and drop operation. Depending on whether we are or not, we want different behavior on hovering, so this is necessary.
The only way I can think of is to handle the drag start and end events and manually track the status, but this requires code, not pure XAML. Plus, it seems like a complete bust, especially since we have to do it for every potential fall target, which is real pain.
So, is there an easy way to say, “Hey ... I'm in drag and drop mode to activate this trigger,” or am I out of luck here?
Update
To clarify what we're trying to do now in pure XAML, you can create a style and then set a style trigger to examine the IsMouseOver property to draw a background selection. Well, we want to do this, but we want to say that if IsMouseOver is true and if IsDragging = true, then apply this trigger.
source
share