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
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Registering for push notifications


Now we will learn how to register for push notifications with the application server we created in the last recipe (Creating a service to send push notifications). In this recipe, we will create a surf updates app for the Hawaiian island of Oahu. The application will provide surf information about the island and allow you to select a specific beach to send hourly surf updates to the application tile.

Getting ready

Create a new project in Visual Studio named SurfTileNotifications using the Windows Phone Application template for the phone application.

The phone application will display some general information about the surf conditions of the island and then list all the beach surf conditions on the MainPage of the phone project:

  1. 1. First set the x:Name attribute on the PhoneApplicationPage to root. Delete the ApplicationTitle TextBlock. Set the text property on the PageTitle TextBlock to Oahu Surf Updates.

  2. 2. Next create a ScrollViewer with an inner vertical...