tags:

views:

322

answers:

2

I'm trying to create a custom WPF control that is draggable, but also animates as it is dragged. I need to override OnMouseDown to implement the dragging functionality, but I also want my animation triggered on the MouseDown event.

Without dragging functionality--i.e., when OnMouseDown is not overriden--the animation works, but when I override OnMouseDown to implement the dragging functionality, the animation stops working.

What's the trick here?

Thanks!

+1  A: 

Solution: I'm using PreviewMouseLeftButtonDown instead of overriding OnMouseDown to start dragging operations.

Christopher
A: 

Is there a way to add an event listener rather than overriding the function?

mmattax