Windows 8 Animation

Source: Internet
Author: User
A simple example of Windows 8 standard Animation Program Demonstrate how to use the API (Windows. UI. Core animation measurement. Animationmetrics enters the original parameter to determine the animation in the window animation library. This information can help developers use the application and application framework to create animations that match windows and other programs using the window animation library. This demonstrates how this method involves: • Adding a project to a list • bringing a new page to the screen Public Sealed Partial Class Scenariolist: Page
{
// A pointer back to the main page which is used to gain access to the input and output frames and their content.
Mainpage rootpage = Null ;

PublicScenariolist ()
{
Initializecomponent ();
}

# region template-related code-do not remove
void scenarios_selectionchanged ( Object sender, selectionchangedeventargs E)
{< br> If (scenarios. selecteditem! = null )
{< br> rootpage. policyuser ( "" , policytype. statusmessage);

Listboxitem selectedlistboxitem = scenarios. selecteditemAsListboxitem;
Suspensionmanager. sessionstate ["Selectedscenario"] = Selectedlistboxitem. Name;

If (Rootpage. inputframe! = Null & Rootpage. outputframe! = Null )
{
// Load the input and output pages for the current scenario into their respective frames.

Rootpage. donavigation (type. GetType ( Typeof (Scenariolist). namespace + " . " + " Scenarioinput " + (Scenarios. selectedindex + 1 ). Tostring (), rootpage. inputframe );
Rootpage. donavigation (type. GetType ( Typeof (Scenariolist). namespace + " . " + " Scenariooutput " + (Scenarios. selectedindex + 1 ). Tostring (), rootpage. outputframe );
}
}
}

Protected Override VoidOnnavigatedto (navigationeventargs E)
{
Rootpage = E. ParameterAsMainpage;
Scenarios. selectionchanged + =NewSelectionchangedeventhandler (scenarios_selectionchanged );

// Starting scenario is the first or based upon a previous selection.
Listboxitem startingscenario = Null ;
If (Suspensionmanager. sessionstate. containskey ( " Selectedscenario " ))
{
String selectedscenarioname = suspensionmanager. sessionstate [ " Selectedscenario " ] As String ;
Startingscenario = This . Findname (selectedscenarioname) As Listboxitem;
}

Scenarios. selecteditem = startingscenario! =Null? Startingscenario: scenario1;
}
# Endregion
}

Complete example

/Files/risk/windows8/animated sample.rar

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.