0

我曾经MouseDragElementBehavior让用户在画布上拖放形状:

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

现在,我想知道 myShape 何时被移动以及 myShape 何时被丢弃。您能否建议一个在 myShape 移动时打印鼠标坐标并在 myShape 被丢弃时打印“Dropped”的代码?非常感谢 !

4

1 回答 1

1

MouseDragElementBehavior 类有

  • 拖动开始
  • 拖动完成
  • 拖动

事件。我相信订阅那些会做你需要的

于 2010-01-10T19:52:55.047 回答