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