How to draw shapes in WP7 with the finger?

心已入冬 提交于 2020-01-02 07:41:10

问题


How to draw shapes in WP7 with the finger? I am trying to implement a simple paint application but I am not sure how to make the drawing.


回答1:


fingerpaint is your friend

  • try it out on Ruby using http://script.iron7.com/#/Script/Detail?scriptId=FingerPaint&userLowerCaseName=iron7

  • or in C# at http://sigurdsnorteland.wordpress.com/2010/10/20/fingerpaint-a-little-wp7-paint-app/

Note that the two sets of code aren't quite the same - the C# fingerpaint had some issues about drawing new tracks on top of old ones so I modified this when I wrote the Ruby one.

Also note that to take this further, you should probably support multitouch.




回答2:


There are two examples for you, you can download it from the below links.

Sample Project 1

Sample Project 2




回答3:


Line Handle the StylusDown, StylusMove, and StylusUp events. Draw lines as appropriate depending on if you want straight vs. free form lines.



来源:https://stackoverflow.com/questions/5232870/how-to-draw-shapes-in-wp7-with-the-finger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!