You are previewing Windows Phone 7 Recipes: A Problem-Solution Approach.
O'Reilly logo
Windows Phone 7 Recipes: A Problem-Solution Approach

Book Description

Developers are racing to discover how to develop for Windows Phone 7—and there is no quicker resource to help you get up to speed than Windows Phone 7 Recipes. It covers all aspects of development, configuration, testing, and distribution with detailed code samples and rapid walkthroughs. You'll find recipes that unlock advanced user interface development, data storage and retrieval, integration with Cloud services, adding media and location based services, and working with Silverlight and Expression Blend. Learn to use sensors such as Camera, GPS, and Accelerometer to build cutting edge applications. Manage the new way to interact with applications using Gestures library both from XNA Framework library and Silverlight Windows Phone Toolkit library.

Put a professional polish on your Windows Phone 7 development with Windows Phone 7 Recipes!

What you'll learn

  • Get full exposure to designing, developing, testing, and distributing your Windows Phone 7 applications

  • Create compelling user interfaces using Silverlight and Expression Blend

  • Understand how to work with device data using isolated storage, LINQ, and XML serialization

  • Extend your application to the Cloud using Push Notifications and web based services

  • How to distribute your application via the Windows Phone Marketplace

Who this book is for

Existing .NET and Windows Mobile developers will find this book of great use. Developers moving to Windows Phone 7 programming from other areas such as iOS development will find it's quick-reference layout especially valuable.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewer
  4. Acknowledgments
  5. About This Book
  6. 1. Introduction to Windows Phone 7 Application Development
    1. 1.1. Examining Windows Phone 7
      1. 1.1.1. Problem
      2. 1.1.2. Solution
    2. 1.2. Understanding the Development Tools
      1. 1.2.1. Problem
      2. 1.2.2. Solution
      3. 1.2.3. How It Works
    3. 1.3. Creating a Simple Silverlight Windows Phone 7 Application
      1. 1.3.1. Problem
      2. 1.3.2. Solution
      3. 1.3.3. How It Works
        1. 1.3.3.1. The Code
      4. 1.3.4. Usage
    4. 1.4. Creating a Simple XNA Windows Phone 7 Application
      1. 1.4.1. Problem
      2. 1.4.2. Solution
      3. 1.4.3. How It Works
        1. 1.4.3.1. The Code
      4. 1.4.4. Usage
    5. 1.5. Deploying the Application to the Windows Phone 7 Emulator
      1. 1.5.1. Problem
      2. 1.5.2. Solution
      3. 1.5.3. Usage
    6. 1.6. Deploying the Windows Phone 7 Application on the Device
      1. 1.6.1. Problem
      2. 1.6.2. Solution
      3. 1.6.3. How It Works
      4. 1.6.4. Usage
    7. 1.7. Sending a Windows Phone 7 Application to the Marketplace
      1. 1.7.1. Problem
      2. 1.7.2. Solution
      3. 1.7.3. How It Works
    8. 1.8. Creating a Trial Windows Phone 7 Application
      1. 1.8.1. Problem
      2. 1.8.2. Solution
      3. 1.8.3. How It Works
        1. 1.8.3.1. The Code
      4. 1.8.4. Usage
  7. 2. Windows Phone 7 Execution Model
    1. 2.1. Navigating Between Pages
      1. 2.1.1. Problem
      2. 2.1.2. Solution
      3. 2.1.3. How It Works
      4. 2.1.4. The Code
      5. 2.1.5. Usage
    2. 2.2. Passing Data Through Pages
      1. 2.2.1. Problem
      2. 2.2.2. Solution
      3. 2.2.3. How It Works
      4. 2.2.4. The Code
      5. 2.2.5. Usage
    3. 2.3. Navigating Between Pages by Using Global Application Variables
      1. 2.3.1. Problem
      2. 2.3.2. Solution
      3. 2.3.3. How It Works
      4. 2.3.4. The Code
      5. 2.3.5. Usage
    4. 2.4. Navigating Between Pages with State
      1. 2.4.1. Problem
      2. 2.4.2. Solution
      3. 2.4.3. How It Works
      4. 2.4.4. The Code
      5. 2.4.5. Usage
    5. 2.5. Managing Tombstoning in Windows Phone 7 Silverlight Applications
      1. 2.5.1. Problem
      2. 2.5.2. Solution
      3. 2.5.3. How It Works
      4. 2.5.4. The Code
      5. 2.5.5. Usage
    6. 2.6. Managing Tombstoning in Windows Phone 7 XNA Applications
      1. 2.6.1. Problem
      2. 2.6.2. Solution
      3. 2.6.3. How It Works
      4. 2.6.4. The Code
      5. 2.6.5. Usage
    7. 2.7. Managing Obscured and Unobscured Events
      1. 2.7.1. Problem
      2. 2.7.2. Solution
      3. 2.7.3. How It Works
      4. 2.7.4. The Code
      5. 2.7.5. Usage
  8. 3. User Interface
    1. 3.1. Creating an Animated Splash Screen
      1. 3.1.1. Problem
      2. 3.1.2. Solution
      3. 3.1.3. How It Works
      4. 3.1.4. The Code
      5. 3.1.5. Usage
    2. 3.2. Using the ApplicationBar Control
      1. 3.2.1. Problem
      2. 3.2.2. Solution
      3. 3.2.3. How It Works
      4. 3.2.4. The Code
      5. 3.2.5. Usage
    3. 3.3. Detecting Changes in the Theme Template
      1. 3.3.1. Problem
      2. 3.3.2. Solution
      3. 3.3.3. How It Works
      4. 3.3.4. The Code
      5. 3.3.5. Usage
    4. 3.4. Customizing the Soft Input Panel Keyboard to Accept Only Numbers
      1. 3.4.1. Problem
      2. 3.4.2. Solution
      3. 3.4.3. How It Works
      4. 3.4.4. The Code
      5. 3.4.5. Usage
    5. 3.5. Using the Windows Phone 7 Predefined Styles
      1. 3.5.1. Problem
      2. 3.5.2. Solution
      3. 3.5.3. How It Works
      4. 3.5.4. The Code
      5. 3.5.5. Usage
    6. 3.6. Localizing Your Application
      1. 3.6.1. Problem
      2. 3.6.2. Solution
      3. 3.6.3. How It Works
      4. 3.6.4. The Code
      5. 3.6.5. Usage
    7. 3.7. Using Panorama and Pivot Controls
      1. 3.7.1. Problem
      2. 3.7.2. Solution
      3. 3.7.3. How It Works
      4. 3.7.4. The Code
      5. 3.7.5. Usage
    8. 3.8. Spicing Up the User Interface with the Silverlight Toolkit
      1. 3.8.1. Problem
      2. 3.8.2. Solution
      3. 3.8.3. How It Works
      4. 3.8.4. The Code
      5. 3.8.5. Usage
    9. 3.9. Using Launchers and Choosers
      1. 3.9.1. Problem
      2. 3.9.2. Solution
      3. 3.9.3. How It Works
      4. 3.9.4. The Code
      5. 3.9.5. Usage
  9. 4. User Interface With Expression Blend
    1. 4.1. Getting Ready for Light and Dark
      1. 4.1.1. Problem
      2. 4.1.2. Solution
      3. 4.1.3. How It Works
      4. 4.1.4. The Code
      5. 4.1.5. Usage
    2. 4.2. Changing the Skin of Your App
      1. 4.2.1. Problem
      2. 4.2.2. Solution
      3. 4.2.3. How It Works
      4. 4.2.4. Usage
    3. 4.3. Creating Some Cool Animation
      1. 4.3.1. Problem
      2. 4.3.2. Solution
      3. 4.3.3. How It Works
      4. 4.3.4. The Code
      5. 4.3.5. Usage
    4. 4.4. Customizing a Control
      1. 4.4.1. Problem
      2. 4.4.2. Solution
      3. 4.4.3. How It Works
      4. 4.4.4. The Code
      5. 4.4.5. Usage
  10. 5. Gestures
    1. 5.1. Managing Gestures in a Silverlight Windows Phone 7 Application
      1. 5.1.1. Problem
      2. 5.1.2. Solution
      3. 5.1.3. How It Works
      4. 5.1.4. The Code
      5. 5.1.5. Usage
    2. 5.2. Adding Gestures Management to Click-less Silverlight Controls
      1. 5.2.1. Problem
      2. 5.2.2. Solution
      3. 5.2.3. How It Works
      4. 5.2.4. The Code
      5. 5.2.5. Usage
    3. 5.3. Handling Gestures in a Graphical Context Such as a Game Menu
      1. 5.3.1. Problem
      2. 5.3.2. Solution
      3. 5.3.3. How It Works
      4. 5.3.4. The Code
      5. 5.3.5. Usage
    4. 5.4. Managing Gestures from the Silverlight for Windows Phone 7 Toolkit
      1. 5.4.1. Problem
      2. 5.4.2. Solution
      3. 5.4.3. How It Works
        1. 5.4.3.1. The Code
      4. 5.4.4. Usage
  11. 6. Sensors
    1. 6.1. Resetting a form by shaking the phone!
      1. 6.1.1. Problem
      2. 6.1.2. Solution
      3. 6.1.3. How It Works
      4. 6.1.4. The Code
      5. 6.1.5. Usage
    2. 6.2. Creating a Seismograph
      1. 6.2.1. Problem
      2. 6.2.2. Solution
      3. 6.2.3. How It Works
      4. 6.2.4. The Code
      5. 6.2.5. Usage
    3. 6.3. Indicating the User's Position?
      1. 6.3.1. Problem
      2. 6.3.2. Solution
      3. 6.3.3. How It Works
      4. 6.3.4. The Code
      5. 6.3.5. Usage
    4. 6.4. Displaying Sunset and Sunrise
      1. 6.4.1. Problem
      2. 6.4.2. Solution
      3. 6.4.3. How It Works
      4. 6.4.4. The Code
      5. 6.4.5. Usage
    5. 6.5. Indicating the User's Position via Coordinates
      1. 6.5.1. Problem
      2. 6.5.2. Solution
      3. 6.5.3. How It Works
      4. 6.5.4. The Code
      5. 6.5.5. Usage
    6. 6.6. Using the Radio
      1. 6.6.1. Problem
      2. 6.6.2. Solution
      3. 6.6.3. How It Works
      4. 6.6.4. The Code
      5. 6.6.5. Usage
  12. 7. Media Management
    1. 7.1. Taking a Photo from Your Phone Camera
      1. 7.1.1. Problem
      2. 7.1.2. Solution
      3. 7.1.3. How It Works
      4. 7.1.4. The Code
      5. 7.1.5. Usage
    2. 7.2. Picking a Photo from Your Media Library
      1. 7.2.1. Problem
      2. 7.2.2. Solution
      3. 7.2.3. How It Works
      4. 7.2.4. The Code
      5. 7.2.5. Usage
    3. 7.3. Using Media Player to Shuffle Songs in Your Media Library
      1. 7.3.1. Problem
      2. 7.3.2. Solution
      3. 7.3.3. How It Works
      4. 7.3.4. The Code
      5. 7.3.5. Usage
    4. 7.4. Using the Microphone in the Funny Repeater Application
      1. 7.4.1. Problem
      2. 7.4.2. Solution
      3. 7.4.3. How It Works
      4. 7.4.4. The Code
      5. 7.4.5. Usage
    5. 7.5. Using the MediaElement Control to Play Both Music and Video
      1. 7.5.1. Problem
      2. 7.5.2. Solution
      3. 7.5.3. How It Works
      4. 7.5.4. The Code
      5. 7.5.5. Usage
    6. 7.6. Adding Integration with the Music-Videos Hub
      1. 7.6.1. Problem
      2. 7.6.2. Solution
      3. 7.6.3. How It Works
      4. 7.6.4. The Code
      5. 7.6.5. Usage
  13. 8. Isolated Storage
    1. 8.1. Saving a File in Isolated Storage and Loading It
      1. 8.1.1. Problem
      2. 8.1.2. Solution
      3. 8.1.3. How It Works
      4. 8.1.4. The Code
      5. 8.1.5. Usage
    2. 8.2. Saving Serialized Data
      1. 8.2.1. Problem
      2. 8.2.2. Solution
      3. 8.2.3. How It Works
      4. 8.2.4. The Code
      5. 8.2.5. Usage
    3. 8.3. Modifying Settings of Your Application
      1. 8.3.1. Problem
      2. 8.3.2. Solution
      3. 8.3.3. How It Works
      4. 8.3.4. The Code
      5. 8.3.5. Usage
    4. 8.4. Saving a Photo in Isolated Storage
      1. 8.4.1. Problem
      2. 8.4.2. Solution
      3. 8.4.3. How It Works
      4. 8.4.4. The Code
      5. 8.4.5. Usage
  14. 9. In the Cloud
    1. 9.1. Interacting with WCF
      1. 9.1.1. Problem
      2. 9.1.2. Solution
      3. 9.1.3. How It Works
      4. 9.1.4. The Code
      5. 9.1.5. Usage
    2. 9.2. Creating a Feed Reader
      1. 9.2.1. Problem
      2. 9.2.2. Solution
      3. 9.2.3. How It Works
      4. 9.2.4. The Code
      5. 9.2.5. Usage
    3. 9.3. Creating a Google API–Based Translator
      1. 9.3.1. Problem
      2. 9.3.2. Solution
      3. 9.3.3. How It Works
      4. 9.3.4. The Code
      5. 9.3.5. Usage
    4. 9.4. Pushing Your Notification
      1. 9.4.1. Problem
      2. 9.4.2. Solution
      3. 9.4.3. How It Works
      4. 9.4.4. The Code
      5. 9.4.5. Usage
  15. 10. Testing Windows Phone Applications
    1. 10.1. Implementing MVVM on Windows Phone by Using MVVMLight
      1. 10.1.1. Problem
      2. 10.1.2. Solution
      3. 10.1.3. How It Works
      4. 10.1.4. The Code
      5. 10.1.5. Usage
    2. 10.2. Using MVVM and Performing Unit Testing
      1. 10.2.1. Problem
      2. 10.2.2. Solution
      3. 10.2.3. How It Works
      4. 10.2.4. The Code
      5. 10.2.5. Usage