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

Updating the tile background without push

In this task, we will update the background of our application tile on a static schedule. This is the simplest form of push notification. The application will provide some eye candy for the user on the home screen by updating the tile background with the NASA daily image.

Getting ready

Create a new project in Visual Studio named DailyTileBackground using the Windows Phone Application template.

How to do it...

Scheduled tile background updates do not require a custom service component, only code on the phone to define the schedule and image source. So, the code for this task will be located in the MainPage.xaml.cs code-behind file:

  1. 1. Add the using statement for the Microsoft.Phone.Shell namespace.

  2. 2. Create a new ShellTileSchedule type and set its properties:

    • Recurrence: The type UpdateRecurrence has two options:

      • OneTime: used for single tile updates.

      • Interval: used for multiple updates at a given interval type.

    • UpdateInterval: Only used if Recurrence is...