views:

57

answers:

1

Hi, I used MouseDragElementBehavior to let user drag & drop Shapes on a Canvas:

MouseDragElementBehavior dragBehavior = new MouseDragElementBehavior();
dragBehavior.Attach(myShape);

Now, I would like to know when myShape was moved and when myShape was dropped. Could you please suggest a code that prints the mouse coordinates when myShape is moved, and prints "Dropped" when myShape is dropped ? Thank you so much !

+1  A: 

MouseDragElementBehavior class has

  • DragBegun
  • DragFinished
  • Dragging

events. I believe subscribing to those would do what you need

serge_gubenko