transition effect in windows phone 7
I am currently working in Visual studio 2010 Express Edition For Windows Phone 7.I want to apply tr开发者_运维技巧ansition effects like dissolve,fading,slide at various places in my application.I am a newbie in windows phone 7 so not able to understand how and where to start? Also I downloaded WPFSLFx library from HLSL Shader Effect Lab..?But no idea how to use it?
Download the wp7 toolkit from here:
http://silverlight.codeplex.com/releases/view/55034
And use the page transitions.
They are very simple to use, just some xaml added to the page:
<toolkit:TransitionService.NavigationInTransition> <toolkit:NavigationInTransition> <toolkit:NavigationInTransition.Backward> <toolkit:TurnstileTransition Mode="BackwardIn"/> </toolkit:NavigationInTransition.Backward> <toolkit:NavigationInTransition.Forward> <toolkit:TurnstileTransition Mode="ForwardIn"/> </toolkit:NavigationInTransition.Forward> </toolkit:NavigationInTransition> </toolkit:TransitionService.NavigationInTransition> <toolkit:TransitionService.NavigationOutTransition> <toolkit:NavigationOutTransition> <toolkit:NavigationOutTransition.Backward> <toolkit:TurnstileTransition Mode="BackwardOut"/> </toolkit:NavigationOutTransition.Backward> <toolkit:NavigationOutTransition.Forward> <toolkit:TurnstileTransition Mode="ForwardOut"/> </toolkit:NavigationOutTransition.Forward> </toolkit:NavigationOutTransition> </toolkit:TransitionService.NavigationOutTransition>
Here is a tutorial:
http://www.windowsphonegeek.com/articles/wp7-transitions-in-depth--key-concepts-and-api
One possible approach is to use Expression Blend for Windows Phone, which is part of the free developer tools: http://create.msdn.com/en-us/home/getting_started
You can have a look at the Expression Blend reference documentation beforehand: http://msdn.microsoft.com/en-us/library/ff979338%28v=Expression.40%29.aspx
Specifically, look at the "Animation behaviors" here: http://msdn.microsoft.com/en-us/library/ff979326%28v=Expression.40%29.aspx
Once Blend has generated this initial XAML, it is a good idea to study it a little further, which will hopefully give you sufficient ground to write some similar behaviors on your own.
<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:SlideTransition Mode="SlideRightFadeIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:SlideTransition Mode="SlideLeftFadeIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:SlideTransition Mode="SlideRightFadeOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>
精彩评论