Windows® Phone 7.5 Unleashed

Book description

Full Color: Figures and code appear as they do in Visual Studio

Windows Phone 7.5 Unleashed is the first comprehensive, start-to-finish developer’s guide to Microsoft’s brand-new Windows Phone 7.5. Written by Microsoft MVP and leading WPF/Silverlight innovator Daniel Vaughan, this full-color guide covers everything developers need to rapidly build highly competitive Windows Phone 7.5 mobile apps.

Vaughan teaches through complete sample apps that illuminate each key concept with fully explained code and real-world context. He presents real-world best practices for building highly functional and attractive Metro interfaces; integrating touch, rich media, and data; testing; profiling; and more. Throughout, he shares expert insights available in no other book, drawing on his exceptional access to the Windows Phone development team through the elite Microsoft Silverlight and WPF Insiders group.

Along the way, he presents exceptionally practical and thorough coverage of many powerful new Windows Phone 7.5 platform enhancements--including full chapters on sensors, the camera, XNA graphics, local databases, scheduled actions, and background file transfers.

Detailed information on how to...

  • Get started fast with Silverlight Windows Phone development in Visual Studio

  • Master the Capabilities Model, threading, and the Execution Model

  • Create attractive Metro interfaces using Windows Phone’s rich set of controls, including the Silverlight for Windows Phone Toolkit

  • Make the most of the application bar and other interface elements

  • Enhance user experience with advanced support for touch, gesture, and sensors

  • Build location-aware apps that use Bing Maps and location services

  • Quickly internationalize apps for global markets

  • Leverage Windows Phone 7.5’s improved camera support

  • Connect apps to online services via SOAP, REST, and ODATA

  • Validate user input on the client side or via Web services

  • Use Windows Phone 7.5’s powerful new local database support

  • Implement background actions, file transfers, and audio playback

  • Incorporate game-style XNA graphics

  • Unit test to find defects earlier, saving time and money



  • Table of contents

    1. Title Page
    2. Copyright Page
    3. Contents at a Glance
    4. Table of Contents
    5. Foreword
    6. Preface
      1. Scope of This Book
      2. Assumptions about the Reader
      3. Book Structure
      4. Code Samples
    7. About the Author
    8. Dedication
    9. Acknowledgments
    10. We Want to Hear from You!
    11. Reader Services
    12. Part I. Windows Phone App Development Fundamentals
      1. Chapter 1. Introduction to Windows Phone App Development
        1. Installing the Windows Phone SDK
        2. Comparing XNA and Silverlight
        3. Creating Your First Silverlight for Windows Phone App
        4. Creating a First Windows Phone XNA App
        5. Summary
      2. Chapter 2. Fundamental Concepts in Silverlight Development for Windows Phone
        1. Understanding the Role of XAP Files
        2. The Windows Phone Capabilities Model
        3. The Threading Model for Silverlight Graphics and Animation in Windows Phone
        4. Understanding the Frame Rate Counter
        5. The Windows Phone Performance Analysis Tool
        6. Device Status
        7. Applying the Model-View-ViewModel Pattern to a Windows Phone App
        8. Property Change Notification
        9. Using Commands
        10. Argument Validation
        11. A Platform Agnostic Dialog Service
        12. Summary
      3. Chapter 3. Application Execution Model
        1. Exploring the Execution Model
        2. Running Under the Lock Screen
        3. Page Navigation
        4. Walking Through the Bookshop Sample Application
        5. Summary
      4. Chapter 4. Page Orientation
        1. Orientation and the PhoneApplicationPage Class
        2. Silverlight Toolkit Animated Page Transitions
        3. Summary
    13. Part II. Essential Elements
      1. Chapter 5. Content Controls, Items Controls, and Range Controls
        1. Control Type Taxonomy
        2. Content Controls
        3. Buttons
        4. Items Controls
        5. Range Controls
        6. Summary
      2. Chapter 6. Text Elements
        1. Text Element Types
        2. TextBlock
        3. Font Properties
        4. Built-In Fonts
        5. Font Embedding
        6. TextBox
        7. PasswordBox
        8. RichTextBox
        9. Clipboard
        10. Summary
      3. Chapter 7. Media and Web Elements
        1. Displaying Images with the Image Element
        2. Providing a Drawing Surface with the InkPresenter Element
        3. Playing Audio and Video with the MediaElement
        4. Viewing High-Resolution Images with the MultiScaleImage Element
        5. Displaying Web Content with the WebBrowser Element
        6. Summary
      4. Chapter 8. Taming the Application Bar
        1. Exploring the Built-In Application Bar
        2. Introducing the Custom AppBar
        3. Summary
      5. Chapter 9. Silverlight Toolkit Controls
        1. Getting Started with the Toolkit
        2. ListPicker
        3. AutoCompleteBox
        4. ContextMenu
        5. DatePicker and TimePicker
        6. LoopingSelector
        7. LongListSelector
        8. PerformanceProgressBar
        9. TiltEffect
        10. ToggleSwitch
        11. WrapPanel
        12. Summary
      6. Chapter 10. Pivot and Panorama
        1. Pivot and Panorama Differences and Similarities
        2. Pivot and Panorama Placement in the FCL
        3. Using the Pivot Control
        4. Using the Panorama Control
        5. Things to Avoid When Using the Panorama and Pivot
        6. Silverlight Toolkit Lockable Pivot
        7. Summary
    14. Part III. Windows Phone App Development
      1. Chapter 11. Touch
        1. Handling Touch with Mouse Events
        2. Touch and TouchPoint Classes
        3. Manipulation Events
        4. UIElement Touch Gesture Events
        5. Silverlight Toolkit Gestures
        6. Designing Touch Friendly User Interfaces
        7. Summary
      2. Chapter 12. Launchers and Choosers
        1. API Overview
        2. Choosers and the Application Execution Model
        3. Launchers and Choosers in Detail
        4. Contacts and Appointments
        5. Summary
      3. Chapter 13. Push Notification
        1. Push Notification Types
        2. Benefits of Push Notification
        3. Understanding Push Notification
        4. Getting Started with Push Notification
        5. Subscribing to Push Notification
        6. Power Management and Push Notification
        7. Sending Push Notifications
        8. Toast Notifications
        9. Tile Notifications
        10. Raw Notifications
        11. Identifying Notifications in an HttpWebResponse
        12. Notification Classes
        13. Cloud Service Authentication
        14. Building a Stock Ticker Application
        15. Summary
      4. Chapter 14. Sensors
        1. Sensors Overview
        2. Measuring Force with the Accelerometer
        3. Measuring Direction with the Compass
        4. Sensing Rotation with the Gyroscope
        5. Improving Sensor Accuracy with the Motion Sensor
        6. Summary
      5. Chapter 15. Geographic Location
        1. Location Sensing Technologies
        2. Geographic Location Architecture
        3. Getting Started with Location
        4. Testing Apps That Use the GeoCoordinateWatcher
        5. Code Driven Location Simulation
        6. A Walkthrough of the Position Viewer Sample
        7. Sampling the PositionChanged Event with Rx
        8. Summary
      6. Chapter 16. Bing Maps
        1. Getting Started with Bing Maps
        2. Sample Code Overview
        3. Location Tracking
        4. Pushpins
        5. Route Calculation Using Bing Maps SOAP Services
        6. Summary
      7. Chapter 17. Internationalization
        1. Terminology
        2. Localizability Using Resx Files
        3. Dynamic Localizability—Updating the UI When the Culture Changes
        4. Localizing Images Using Resx Files
        5. The Resx Localizability Sample
        6. Summary
      8. Chapter 18. Extending the Windows Phone Picture Viewer
        1. Debugging Apps That Rely on the Pictures Hub
        2. Creating a Photos Extras Application
        3. Share Menu Extensibility
        4. Using the Windows Phone Connect Tool
        5. Summary
      9. Chapter 19. Camera
        1. PhotoCamera
        2. Using the Silverlight Webcam API
        3. Summary
      10. Chapter 20. Incorporating XNA Graphics in Silverlight
        1. Supporting Components
        2. Displaying a 3D XNA Model in a Hybrid App
        3. Summary
      11. Chapter 21. Microphone and FM Radio
        1. Recording Audio with the Microphone
        2. Controlling the Phone’s FM Radio
        3. Summary
      12. Chapter 22. Unit Testing
        1. Automated Testing
        2. Introduction to the Windows Phone Unit Test Framework
        3. Creating a Test Project
        4. Creating a Test Class
        5. Tag Expressions
        6. Metadata and Assertions
        7. A Testable Chat Client
        8. Inversion of Control (IoC)
        9. Testing Trial Conditions
        10. Testing with Launchers and Choosers
        11. Summary
    15. Part IV. Building Windows Phone Data Driven Applications
      1. Chapter 23. Input Validation
        1. Defining Input Validation
        2. Input Validation Using Property Setters
        3. Defining Validation Visual States in Silverlight for Windows Phone
        4. Asynchronous and Composite Validation
        5. Summary
      2. Chapter 24. Network Services
        1. Network Service Technologies
        2. Monitoring Network Connectivity
        3. Introduction to OData
        4. Consuming OData
        5. Using an OData Proxy
        6. Building an eBay OData Consumer Application
        7. Fetching Data When the User Scrolls to the End of a List
        8. Summary
      3. Chapter 25. Isolated Storage and State Preservation
        1. Understanding Isolated Storage
        2. Abstracting IsolatedStorageSettings
        3. Building an Automatic State Preservation System
        4. Summary
      4. Chapter 26. Local Databases
        1. SQL Server Compact
        2. Deployment of Local Databases
        3. LINQ to SQL on the Phone
        4. LINQ to SQL Platform Differences
        5. Getting Started with Local Databases
        6. Sample Twitter Timeline Viewer
        7. Viewing a Local Database Schema
        8. Database-First Using SqlMetal
        9. Deploying a Database to Isolated Storage
        10. Abstracting the Navigation Service
        11. Observing LINQ to SQL Queries with a Custom Log
        12. Updating a Database Schema
        13. Mapping an Inheritance Hierarchy
        14. Concurrency
        15. Summary
    16. Part V. Multitasking
      1. Chapter 27. Scheduled Actions
        1. Background Tasks
        2. Scheduled Notifications
        3. Scheduled Tasks
        4. Using a Mutex to Access Common Resources Safely
        5. Summary
      2. Chapter 28. Background File Transfers
        1. Background Transfer Requests
        2. Background File Transfer Sample Code
        3. Summary
      3. Chapter 29. Background Audio
        1. Background Agent Recap
        2. Background Audio Overview
        3. Background Audio Player
        4. Representing Audio Files with the AudioTrack Class
        5. Creating a Custom Audio Player Agent
        6. AudioPlayerAgent Sample
        7. Audio Streaming Agents
        8. Summary
    17. Bibliography
    18. Index

    Product information

    • Title: Windows® Phone 7.5 Unleashed
    • Author(s): Daniel Vaughan
    • Release date: March 2012
    • Publisher(s): Sams
    • ISBN: 9780132661065