[英]Drag & Drop Shapes on Canvas
I used MouseDragElementBehavior
to let user drag & drop Shapes on a Canvas: 我使用
MouseDragElementBehavior
允许用户将Shapes拖放到Canvas上:
MouseDragElementBehavior dragBehavior = new MouseDragElementBehavior();
dragBehavior.Attach(myShape);
Now, I would like to know when myShape was moved and when myShape was dropped. 现在,我想知道何时移动myShape和何时删除myShape。 Could you please suggest a code that prints the mouse coordinates when myShape is moved, and prints "Dropped" when myShape is dropped ?
您能否建议一个代码,该代码在移动myShape时打印鼠标坐标,并在放置myShape时打印“ Dropped”? Thank you so much !
非常感谢 !
MouseDragElementBehavior class has MouseDragElementBehavior类具有
events. 事件。 I believe subscribing to those would do what you need
我相信订阅这些可以满足您的需求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.