WPF: How to combine animations with custom event handling?

I am trying to create a custom WPF drag and drop control, but I also need to animate it when it is dragged. I need to override OnMouseDown to implement the drag and drop functionality, but also want my animation to fire on the MouseDown event.

No drag and drop functionality - that is, when OnMouseDown is not overridden - the animation works, but when I override OnMouseDown to implement the drag and drop functionality, the animation stops working.

What's the trick here?

Thank!

0


source to share


1 answer


Solution: I am using PreviewMouseLeftButtonDown instead of overriding OnMouseDown to start drag and drop operations.



+1


source







All Articles