Book Image

Windows Phone 7 Silverlight Cookbook

By : Jonathan Marbutt, Robb Schiefer
Book Image

Windows Phone 7 Silverlight Cookbook

By: 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

Creating a simple model


Now that we have an understanding of why we need MVVM, let's start to dig into the implementation of how it actually works. In this first example, we will be creating a simple model, which for the most part really doesn't do a whole lot more than describe the data we want to present. In this case, we will be keeping track of venues for a band's concert tour. We will want to keep track of things such as the venue location, number of seats, date, opening act, and so on. We will carry this model through the next few examples to fill the data and allow you to simulate purchasing tickets. We will also create a model for the band information that will create the band name and their concert schedule.

Getting ready

To get started on this project, we will want to create a Windows Phone application in Silverlight for Windows Phone:

We will go ahead and name this project BandTour. Now let's go ahead and add a folder in the solution named Models which will contain our model for...