Page animation is the excessive animation effect of page switching.
In normal times, system programs that use WP mobile phones have the same excessive effect as page flip. I am going to complete the simple addition below.
Use Windows Phone Toolkit
In fact, this animation effect does not need to be implemented by ourselves. The Windows Phone toolkit has encapsulated the ready-made library, and we only need to call it.
Here you can download:
Http://silverlight.codeplex.com/
After installation, you can find [32-bit system remove (x86)] in c: \ Program Files (x86) \ microsoft sdks \ Windows Phone \ v7.1 \ toolkit.
You can reference it to the project. There are many enhancement controls that are also very practical. I believe you have used them.
However, transitionservice. navigationintransition is used here.
Add excessive effects to the page
Step 1: there must be an indispensable preparationIn app. XAML. CS.
Locate rootframe = new phoneapplicationframe ();
Replace with rootframe = new transitionframe ();
Step 2: add the effect code on the page
First add the namespace xmlns: Toolkit = "CLR-namespace: Microsoft. Phone. controls; Assembly = Microsoft. Phone. Controls. toolkit"
Then add the <Phone: phoneapplicationpage> element
<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>
OK completes the page flip animation in two simple steps.
Toolkit provides many animation effects in Microsoft. Phone. Controls. Toolkit \ transitions,
You can also inherit the transitionelement to implement your own animation.
However, I think the default turnstiletransition is the most satisfactory, and it is too dazzling to affect the use.
Use excessive effects as page styles
If there are many pages on which each page requires an effect, you can add the effect as a style to the system resource file or directly write it in APP. XAML.
The method is also simple.
<Application.Resources>
<Style x:Key="TransitionPageStyle" TargetType="phone:PhoneApplicationPage">
<Setter Property="toolkit:TransitionService.NavigationInTransition">
<Setter.Value>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</Setter.Value>
</Setter>
<Setter Property="toolkit:TransitionService.NavigationOutTransition">
<Setter.Value>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
Add a property style = "{staticresource transitionpagestyle}" to the page for the effect.
Page animation is the excessive animation effect of page switching.
In normal times, system programs that use WP mobile phones have the same excessive effect as page flip. I am going to complete the simple addition below.
Use Windows Phone Toolkit
In fact, this animation effect does not need to be implemented by ourselves. The Windows Phone toolkit has encapsulated the ready-made library, and we only need to call it.
Here you can download:
Http://silverlight.codeplex.com/
After installation, you can find [32-bit system remove (x86)] in c: \ Program Files (x86) \ microsoft sdks \ Windows Phone \ v7.1 \ toolkit.
You can reference it to the project. There are many enhancement controls that are also very practical. I believe you have used them.
However, transitionservice. navigationintransition is used here.
Add excessive effects to the page
Step 1: there must be an indispensable preparationIn app. XAML. CS.
Locate rootframe = new phoneapplicationframe ();
Replace with rootframe = new transitionframe ();
Step 2: add the effect code on the page
First add the namespace xmlns: Toolkit = "CLR-namespace: Microsoft. Phone. controls; Assembly = Microsoft. Phone. Controls. toolkit"
Then add the <Phone: phoneapplicationpage> element
<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>
OK completes the page flip animation in two simple steps.
Toolkit provides many animation effects in Microsoft. Phone. Controls. Toolkit \ transitions,
You can also inherit the transitionelement to implement your own animation.
However, I think the default turnstiletransition is the most satisfactory, and it is too dazzling to affect the use.
Use excessive effects as page styles
If there are many pages on which each page requires an effect, you can add the effect as a style to the system resource file or directly write it in APP. XAML.
The method is also simple.
<Application.Resources>
<Style x:Key="TransitionPageStyle" TargetType="phone:PhoneApplicationPage">
<Setter Property="toolkit:TransitionService.NavigationInTransition">
<Setter.Value>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</Setter.Value>
</Setter>
<Setter Property="toolkit:TransitionService.NavigationOutTransition">
<Setter.Value>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
Add a property style = "{staticresource transitionpagestyle}" to the page for the effect.