how to implement textblock flick animation windows mobile 7

被刻印的时光 ゝ 提交于 2019-12-11 07:05:51

问题


How can I implement flick in and out animation on a textblock (swipe) in windows mobile 7?


回答1:


There are two parts to this:

  1. Detecting the flick. - For this I'd recommend staring by looking at the GestureListeners in the toolkit.

  2. Animating the "flick". - This will depend on the exact animation you are looking for. I'd start by creating three textblock which hold the previous, current and next items in your list. If the user swipes one way (say left to right) I'd animate the previous item in and the current item out such that the previous item ends up in exactly the same position as the current one was originally. When the animations are complete I'd update the contents of each item (based on what's now current) and then reset each item (without any animation). If swiping in the other direction I'd do the process but with the "Next" item.

WHatever technique you use - be sure to test the behaviour when swiping multiple times in rapid succession. I've seen lots of apps do this badly - :(



来源:https://stackoverflow.com/questions/5646752/how-to-implement-textblock-flick-animation-windows-mobile-7

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