1. namespace
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
2. Add the following code under the phoneapplicationpage root node:
<Toolkit: transitionservice. navigationintransition> <! -- Specifies the animation to enter the current window --> <Toolkit: navigationintransition> <! -- Animations returned from other windows to the current window --> <Toolkit: navigationintransition. backward> <Toolkit: turnstiletransition mode = "backwardin"/> </Toolkit: navigationintransition. backward> <! -- Animation for the first time entering the current window --> <Toolkit: navigationintransition. forward> <Toolkit: turnstiletransition mode = "forwardin"/> </Toolkit: navigationintransition. forward> </Toolkit: navigationintransition> </Toolkit: transitionservice. navigationintransition> <! -- Specify the animation to exit the current window --> <Toolkit: transitionservice. navigationouttransition> <Toolkit: navigationouttransition> <! -- Animation when exiting from the current window --> <Toolkit: navigationouttransition. Backward> <Toolkit: turnstiletransition mode = "backwardout"/> </Toolkit: navigationouttransition. Backward> <! -- Animation when navigating from the current window to other windows --> <Toolkit: navigationouttransition. forward> <Toolkit: turnstiletransition mode = "forwardout"/> </Toolkit: navigationouttransition. forward> </Toolkit: navigationouttransition> </Toolkit: transitionservice. navigationouttransition>
3. initialize rootframe as transitionframe in the initializephoneapplication method.
Rootframe = new transitionframe ();
In addition to flip pages, Toolkit also provides four different animations: Scroll, rotate, slide, and swivel.