拖曳在画布上放置形状

拖曳在画布上放置形状

本文介绍了拖曳在画布上放置形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用MouseDragElementBehavior让用户拖动&在画布上放置形状:

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

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


现在,我想知道何时移动myShape和何时删除myShape.
您能否建议一个代码来移动myShape时打印鼠标坐标,并在放置myShape时打印"Dropped"?
非常感谢!


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 !

推荐答案


这篇关于拖曳在画布上放置形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 13:36