How to make a cool interface switch [Windows Phone]

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.