When you look at some Windows Phone applicationsProgramIt is possible that you have noticed a dazzling UI switch. Obviously, this will greatly increase the user experience.
Because of the beautification design requirements in our team's project, I did some research. Now I am sending a post to summarize my experiences.
You can use the transitionservice in the Windows Phone toolkit to switch the interface.
To use transitionservice, you must first Add a reference in the project: Microsoft. Phone. Controls. toolkit. dll. Add the following transition service to the layoutroot field in the xaml file of the page to be switched.Code
1 < Toolkit: transitionservice. navigationintransition >
2 < Toolkit: navigationintransition >
3 < Toolkit: navigationintransition. Backward >
4 < Toolkit: turnstiletransition Mode = "Backwardin" />
5 </ Toolkit: navigationintransition. Backward >
6 < Toolkit: navigationintransition. Forward >
7 < Toolkit: turnstiletransition Mode = "Forwardin" />
8 </ Toolkit: navigationintransition. Forward >
9 </ Toolkit: navigationintransition >
10 </ Toolkit: transitionservice. navigationintransition >
11 < Toolkit: transitionservice. navigationouttransition >
12 < Toolkit: navigationouttransition >
13 < Toolkit: navigationouttransition. Backward >
14 < Toolkit: turnstiletransition Mode = "Backwardout" />
15 </ Toolkit: navigationouttransition. Backward >
16 < Toolkit: navigationouttransition. Forward >
17 < Toolkit: turnstiletransition Mode = "Forwardout" />
18 </ Toolkit: navigationouttransition. Forward >
19 </ Toolkit: navigationouttransition >
20 </ Toolkit: transitionservice. navigationouttransition >
It defines four modes of a page, which can be clearly expressed using the following figure.
To achieve automatic switching, you must add the following in the app. CS file:
//Rootframe =NewPhoneapplicationframe (); // comment out
2Rootframe =NewTransitionframe ();
OK. This is basically done. The application can perform UI animation switching according to the format defined on each page.
For better instructions, add some code:
Http://files.cnblogs.com/OMG-Team/Transitions.zip
It supports rotary interface switch, slide interface switch, and rotary interface switch.