Book Image

Windows Phone 7 Silverlight Cookbook

By : Robb Schiefer Jr., Jonathan Marbutt, Robb Schiefer
Book Image

Windows Phone 7 Silverlight Cookbook

By: Robb Schiefer Jr., Jonathan Marbutt, Robb Schiefer

Overview of this book

Silverlight has revolutionized development using Microsoft technologies. It is an excellent tool for mobile application development. The XAML-based markup and familiar C# code are the perfect combination for building apps efficiently and with minimum hassle.Packed full of recipes containing comprehensive instructions for the tasks required to build modern compelling smartphone apps using Silverlight.Starting with application design and architecture, you will quickly move on to more technical features and APIs you can implement to make your app stand out. You will use the Camera API to scan barcode, location services to pinpoint the user’s GPS coordinates and accelerometer to provide feedback based on movement of the phone. All of these features can be provided in a slick user interface through the power of Silverlight. Animations, behaviors and XAML provide all you need and more.
Table of Contents (18 chapters)
Windows Phone 7 Silverlight Cookbook
About the Authors
About the Reviewers

Using timelines for feedback to users

As we have seen so far, animations are a simple way of adding some visual interest to your application. But we have only seen so far the ability to add animations in a non-user driven animation. With any application, most animations are going to be user driven or respond to users.

In this example, we will take our previous example on a timeline and another sample timeline and place buttons to react to each button.

Getting ready

Since we are using the existing timeline example, we are going to simply expand it by adding an additional storyboard that we can swap between. Open the existing application and go to your objects and timeline window. Click the plus button to add an additional storyboard.

This additional storyboard will be used to flip the individual circles using projection. Select all four circles and insert a keyframe at the zero timeframe and another keyframe at two second timeframe. While on the two second time slot, set the Projection settings...