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 view


Everything at this point has been pretty standalone with nothing to really see. With the view, we want to start bringing these elements together to give the user something they can actually see. Just like the ViewModel and the model, the view can actually stand completely independent from the others. This modularity helps provide simplicity in your application for testing and reuse.

Getting ready

We will be adding a view by using the MainPage.xaml page control that is at the start of your application. Let's go ahead and add the view for the concert details by creating a folder called Views, adding a Windows Phone Portrait Page, and naming it Concert.xaml:

How to do it...

Swap over to Expression Blend to build the UI and the data sources. The reason for this is that Blend gives you a much better overview of the data sources in your project as well as an easier way to create them:

  1. 1. To switch to Blend, simply right-click on the MainPage.xaml and hit Open in Expression Blend.

  2. 2....