开发者

WP7 Using TransitioningContentControl for different forward and back animations

开发者 https://www.devze.com 2023-01-19 13:49 出处:网络
I\'m using the TransitioningContentControl to create animations for navigating between pages. I used this blog post as my guide: http://wildermuth.com/2010/07/16/Bring_Back_Page_Transitions_to_the_Win

I'm using the TransitioningContentControl to create animations for navigating between pages. I used this blog post as my guide: http://wildermuth.com/2010/07/16/Bring_Back_Page_Transitions_to_the_Windows_Phone_List_Application_Template

I also found this post that does something very similar: http://www.slickthought.net/post/2010/04/26/Simplifying-Page-Transitions-in-Windows-Phone-7-Silverlight-Applications.aspx

I was able to create navigation animations, but they are the same whether you go forward or backward in the app. I want to create opposite animations depending on navigation. If the user is moving forward, the transition is toward them (like flipping a book to the next page). If the user is moving backward, the transition is the opposite.

I can't find any documentation for this control, just examples. Everything I've seen开发者_开发知识库 targets "DefaultTransition", but I'm wondering if there is something like "ForwardTransition" and "BackwardTransition".


Microsoft has released tools to do the page flipping animations in their latest update to the WP7 Silverlight toolkit.


The TransitioningContentControl only knows about Current and Previous content. So it doesn't have any sense of "forward" or "backward" navigation. You could try defining two different VisualStates - ("NavigateForward" and "NavigateBackward") with opposite animations and then dynamically change the Transition property of the TransitioningContentControl depending on which direction you are navigating.

0

精彩评论

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