开发者

how to implement textblock flick animation windows mobile 7

开发者 https://www.devze.com 2023-02-25 09:14 出处:网络
开发者_开发技巧How can I implement flick in and out animation on a textblock (swipe) in windows mobile 7?There are two parts to this:
开发者_开发技巧

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


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 - :(

0

精彩评论

暂无评论...
验证码 换一张
取 消