7. navigationtransition
This control is used to implement page switching.
1. First add the Toolkit declaration in XAML:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
2. manually add this control to XAML:
<Toolkit: transitionservice. navigationintransition>
<Toolkit: navigationintransition> <! -- Enter the page animation effect -->
<Toolkit: navigationintransition. Backward>
<Toolkit: rotatetransition mode = "in180clockwise"/> <! -- 180 ° flip effect -->
</Toolkit: navigationintransition. Backward>
<Toolkit: navigationintransition. Forward>
<Toolkit: rotatetransition mode = "in180clockwise"/>
</Toolkit: navigationintransition. Forward>
</Toolkit: navigationintransition>
</Toolkit: transitionservice. navigationintransition>
<Toolkit: transitionservice. navigationouttransition>
<Toolkit: navigationouttransition> <! -- Exit the page animation effect -->
<Toolkit: navigationouttransition. Backward>
<Toolkit: rotatetransition mode = "out180clockwise"/>
</Toolkit: navigationouttransition. Backward>
<Toolkit: navigationouttransition. Forward>
<Toolkit: rotatetransition mode = "out180clockwise"/>
</Toolkit: navigationouttransition. Forward>
</Toolkit: navigationouttransition>
</Toolkit: transitionservice. navigationouttransition>
<! -- Layoutroot is the root grid where all page content is placed -->
There are five animation effects for this control, and each animation has multiple modes: rolltransition (which has no mode setting), rotatetransition, slidetransition, swiveltransition, turnstiletransition
In addition, the animation effects for entering and exiting pages can be set to different effects.
3. Most important changes:
Modify the rootframe in the initializephoneapplication () function in APP. XAML. cs. If you do not change the value, there is no animation effect.
// Rootframe = new phoneapplicationframe ();
Rootframe = new transitionframe (); // required
Because the effect is too fast to capture, it cannot ~