SILVERLIGHT FOR WINDOWS PHONE TOOLKIT PAGE TRANSITIONS

In addition to providing new controls, the Silverlight for Windows Phone Toolkit includes several easy-to-use Page Transition classes. By simply wrapping your application pages in these transition classes, you can create dynamic user interface effects for moving between pages in a multi-page application.

To get started with transitions, you need to understand a little about how they work. Basically, each page has both an IN transition and an OUT transition defined. For both the IN and OUT transitions, you can specify a transition effect to apply for when the user moves forward and backward through the page. Let's break this down with some code. Say that your application has multiple pages. The first thing you need to do is add a declaration for TransitionService at the page level, like this:

<phone:PhoneApplicationPage x:Class=“PhoneToolkitSample.Samples.NavigationTransitionSample1” xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml” xmlns:phone=“clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone” xmlns:shell=“clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone” xmlns:d=“http://schemas.microsoft.com/expression/blend/2008” xmlns:mc=“http://schemas.openxmlformats.org/markup-compatibility/2006” xmlns:toolkit=“clr- namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit” FontFamily=“{StaticResource PhoneFontFamilyNormal}” ...

Get Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.