You are previewing Beginning Windows Phone 7 Development, Second Edition.
O'Reilly logo
Beginning Windows Phone 7 Development, Second Edition

Book Description

Microsoft's Windows Phone 7 handsets have injected a new vibrancy into the smartphone marketplace and provided bold new opportunities for the Microsoft development community.

Now in its second edition, Beginning Windows Phone 7 Development has been written to help you identify those opportunities and to learn the skills you'll need to harness them. It covers the very latest developments in the field, including the extended APIs offered in Microsoft's automatic platform update, so you can be assured of having timely, accurate, information at your finger-tips.

Beginning Windows Phone 7 Development, Second Edition starts with the basics, walking you through the process of downloading and setting up the right development tools, including Visual Studio, Expression Blend, Silverlight SDK, and Windows Phone SDK. It then takes you step-by-step though the development process as you build and deploy a complete, working, application complete with a sophisticated user interface. Finally, you'll receive step-by-step instructions on selling your applications through the Microsoft Phone Marketplace.

What you'll learn

  • Create effective networked applications

  • Leverage your phone's GPS capabilities from within your application

  • Interact with the phone's built-in functionality (camera, contacts, maps, accelerometer, video and web browser to name but a few)

  • Construct highly graphical and responsive user interfaces quickly and easily using the features that Microsoft has provided for you

  • How to package and distribute your applications both for personal distribution and through the Windows Phone Marketplace

Who this book is for

This book is for anyone interested in developing applications for the Windows Phone 7. You might be an existing .NET developer looking for a new creative angle or perhaps an iPhone or Android developer looking for a new opportunity.

If you have an understanding of basic .NET coding practices, then this book is for you.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. Who This Book Is For
    2. What You Need to Use This Book
    3. How This Book Is Organized
    4. Where to Find Sources for the Examples
    5. Send Us Your Comments
    6. Contacting the Authors
  6. 1. Introducing Windows Phone 7 and the Windows Phone Platform
    1. 1.1. Windows Phone Overview
    2. 1.2. Windows Phone Hardware Specifications
    3. 1.3. Windows Phone Application Platform
      1. 1.3.1. Silverlight for Windows Phone
      2. 1.3.2. XNA for Windows Phone
      3. 1.3.3. Tools
        1. 1.3.3.1. Visual Studio
        2. 1.3.3.2. Expression Blend
        3. 1.3.3.3. Windows Phone Emulator
        4. 1.3.3.4. Documentation and Support
      4. 1.3.4. Cloud Services
      5. 1.3.5. Metro Design
    4. 1.4. Application Development Life Cycle
    5. 1.5. Summary
  7. 2. Building Windows Phone 7 Applications
    1. 2.1. Preparing Your Development Machine
    2. 2.2. Building Your First Windows Phone 7 Application
      1. 2.2.1. Creating a Windows Phone Project
      2. 2.2.2. Using Your First Windows Phone Silverlight Controls
      3. 2.2.3. Writing Your First Windows Phone Code
      4. 2.2.4. Running Your First Silverlight Windows Phone Application
      5. 2.2.5. Customizing Your First Windows Phone Application
      6. 2.2.6. Styling Your Application
    3. 2.3. Summary
  8. 3. Building Windows Phone 7 Applications Using Cloud Services As Data Stores
    1. 3.1. Introducing the MVVM Pattern
    2. 3.2. Introducing Microsoft Azure and SQL Azure
    3. 3.3. Creating a Cloud Database
      1. 3.3.1. The Entity Framework
      2. 3.3.2. Creating an SQL Azure Database
        1. 3.3.2.1. Signing Up for SQL Azure
        2. 3.3.2.2. Connecting to the SQL Azure Project
        3. 3.3.2.3. Creating an SQL Azure Database
        4. 3.3.2.4. Configuring the SQL Azure Firewall
        5. 3.3.2.5. Testing the SQL Azure Database Connection
      3. 3.3.3. Creating a Database in SQL Azure
        1. 3.3.3.1. Using SQL Server Management Studio to Connect to the Cloud Database
        2. 3.3.3.2. Creating SQL Azure Database Tables
    4. 3.4. Creating a Cloud Service to Access the Cloud Database
      1. 3.4.1. Creating a Windows Azure Project
      2. 3.4.2. Generating an Object Model to Access the Cloud Database
      3. 3.4.3. Implementing a WCF Service to Access the SQL Azure Database
        1. 3.4.3.1. Coding the WCF Contract
        2. 3.4.3.2. Coding the DataContract
        3. 3.4.3.3. Coding the Service
          1. 3.4.3.3.1. Coding AddUser Method
          2. 3.4.3.3.2. Coding AddNote Method
          3. 3.4.3.3.3. Coding UpdateNote Method
          4. 3.4.3.3.4. Coding DeleteNote Method
          5. 3.4.3.3.5. Coding GetNotes Method
          6. 3.4.3.3.6. Coding GetNote Method
        4. 3.4.3.4. Testing Azure WCF NotepadService on Your Machine
    5. 3.5. Building a Phone Client to Access a Cloud Service
      1. 3.5.1. Creating a Windows Phone Project
      2. 3.5.2. Building the User Interface
        1. 3.5.2.1. Building UserRegistrationUserControl
          1. 3.5.2.1.1. Declaring the UI Resources
          2. 3.5.2.1.2. Adding Components for UserRegistrationUserControl
        2. 3.5.2.2. Building NoteListUserControl
          1. 3.5.2.2.1. Declaring the UI Resources
          2. 3.5.2.2.2. Adding Components for NoteListUserControl
        3. 3.5.2.3. Building MainPage
        4. 3.5.2.4. Declaring the UI Resources
        5. 3.5.2.5. Building the Main Page and Adding Components
          1. 3.5.2.5.1. Adding BoolToVisibilityConvert
      3. 3.5.3. Coding MainPage
        1. 3.5.3.1. Specifying the Namespaces
        2. 3.5.3.2. Code Constructor
        3. 3.5.3.3. Coding the Save Button Event
        4. 3.5.3.4. Coding the ViewEdit Button Event
        5. 3.5.3.5. Coding the AddNew Button Event
        6. 3.5.3.6. Coding the Delete Button Event
      4. 3.5.4. Coding the BoolToVisibilityConvert
        1. 3.5.4.1. Specifying the Namespaces and Applying IValueConverter Interface
        2. 3.5.4.2. Implementing IValueConvert
      5. 3.5.5. Adding Reference to NotepadService
      6. 3.5.6. Coding NotepadViewModel
        1. 3.5.6.1. Specifying the Namespaces and Applying INotifyPropertyChanged
        2. 3.5.6.2. Initializing the Variables
        3. 3.5.6.3. Adding the Constructor
        4. 3.5.6.4. Adding SaveNote, AddUser, DeleteNote
        5. 3.5.6.5. Adding NotepadService Eventhandlers
          1. 3.5.6.5.1. AddNoteCompleted
          2. 3.5.6.5.2. GetNotesCompleted
          3. 3.5.6.5.3. UpdateCompleted
          4. 3.5.6.5.4. AddUserCompleted
          5. 3.5.6.5.5. DeleteNoteCompleted
        6. 3.5.6.6. Coding INotifyPropertyChanged Interface
      7. 3.5.7. Testing the Application Against NotepadService Deployed Locally
      8. 3.5.8. Deploying the Service to Windows Azure
        1. 3.5.8.1. Preparing for Windows Azure NotepadService
          1. 3.5.8.1.1. Signing Up for Windows Azure and Creating a Project
          2. 3.5.8.1.2. Connecting to the Windows Azure Project
          3. 3.5.8.1.3. Create and Configuring Windows Azure NotepadService
        2. 3.5.8.2. Deploying NotepadService to Windows Azure
          1. 3.5.8.2.1. Compiling and Publishing NotepadService
          2. 3.5.8.2.2. Deploying NotepadService.cspkg and ServiceConfiguration.cscfg to Windows Azure
      9. 3.5.9. Testing the Notepad Application Against NotepadService Azure Service
    6. 3.6. Summary
  9. 4. Catching and Debugging Errors
    1. 4.1. Debugging Application Exceptions
      1. 4.1.1. Debugging Page Load Exceptions
        1. 4.1.1.1. Catching an Exception
        2. 4.1.1.2. Querying Exception Object Values with Immediate Window
        3. 4.1.1.3. Catching an Unhandled Exception in RootFrame_NavigationFailed or Application_UnhandledException
        4. 4.1.1.4. Handling an Exception RootFrame_NavigationFailed
        5. 4.1.1.5. Fixing the Error in the Code
      2. 4.1.2. Debugging a Web Service Exception
        1. 4.1.2.1. Catching a Web Service Exception
        2. 4.1.2.2. Fixing the CalculatorService Exception
      3. 4.1.3. Testing the Application
    2. 4.2. Registering a Windows Phone Device for Debugging
    3. 4.3. Handling Device Exceptions
      1. 4.3.1. Creating the CatchDeviceExceptionDemo Project
      2. 4.3.2. Building the User Interface
        1. 4.3.2.1. Declaring the UI Resources
        2. 4.3.2.2. Building the Main Page and Adding Components
      3. 4.3.3. Coding the Application
        1. 4.3.3.1. Specifying the Namespaces
        2. 4.3.3.2. Initializing Variables
        3. 4.3.3.3. Implementing Accelerometer Start and Stop Behavior
      4. 4.3.4. Testing the Finished Application
    4. 4.4. Summary
  10. 5. Packaging, Publishing, and Managing Applications
    1. 5.1. Windows Phone Application Publishing Lifecycle
    2. 5.2. Windows Phone Application Certification Requirements
      1. 5.2.1. Application Policies
        1. 5.2.1.1. Windows Phone Application Binary (XAP File)
        2. 5.2.1.2. Things Your Application Must Not Do
        3. 5.2.1.3. Things Your Application Must Do
        4. 5.2.1.4. Location Service (GPS)
        5. 5.2.1.5. Push Notification Service (PNS)
      2. 5.2.2. Content Policies
      3. 5.2.3. Application Submission Validation Requirements
        1. 5.2.3.1. Packaging Requirements
        2. 5.2.3.2. Code Requirements
        3. 5.2.3.3. Using the Application Manifest File to Disclose Phone Features
        4. 5.2.3.4. Language Validation
        5. 5.2.3.5. Images for Windows Phone Marketplace
      4. 5.2.4. Application Certification Requirements
        1. 5.2.4.1. Application Reliability
        2. 5.2.4.2. Performance and Resource Management
        3. 5.2.4.3. Phone Functionality
        4. 5.2.4.4. Security
        5. 5.2.4.5. Technical Support Information
    3. 5.3. Submitting Your First Windows Phone Application to the Windows Phone Marketplace
      1. 5.3.1. Packaging the Application
      2. 5.3.2. Submitting the Application
      3. 5.3.3. Updating Your Application
      4. 5.3.4. Finding Your Application in the Marketplace
    4. 5.4. Summary
  11. 6. Working with the Accelerometer
    1. 6.1. Understanding Orientation and Movement
      1. 6.1.1. Calculating Distance
      2. 6.1.2. Calculating Pitch, Roll, and Yaw
    2. 6.2. Introducing SDK Support for Accelerometers
    3. 6.3. Retrieving Accelerometer Data
      1. 6.3.1. Creating the CaptureAccelerometerData Project
      2. 6.3.2. Building the User Interface
        1. 6.3.2.1. Declaring the UI Resources
        2. 6.3.2.2. Building the Main Page and Adding Components
      3. 6.3.3. Coding the Application
        1. 6.3.3.1. Specifying the Namespaces
        2. 6.3.3.2. Initializing Variables
        3. 6.3.3.3. Capturing and Displaying Accelerometer Data
        4. 6.3.3.4. Implementing Start and Stop of Accelerometer
      4. 6.3.4. Testing the Finished Application
    4. 6.4. Using Accelerometer Data to Move a Ball
      1. 6.4.1. Creating the MoveBall Project
      2. 6.4.2. Building the User Interface
        1. 6.4.2.1. Declaring the UI Resources
        2. 6.4.2.2. Building the Main Page and Adding Components
      3. 6.4.3. Coding the Application
        1. 6.4.3.1. Specifying the Namespaces
        2. 6.4.3.2. Initializing Variables
        3. 6.4.3.3. Handling Captured Accelerometer Data
        4. 6.4.3.4. Applying Captured Accelerometer Data to the Ball
        5. 6.4.3.5. Adding Start and Stop Button Events
      4. 6.4.4. Testing the Finished Application
    5. 6.5. Summary
  12. 7. Application Bar
    1. 7.1. Introducing the Application Bar
    2. 7.2. Adding an Application Bar to a Windows Phone 7 Application
      1. 7.2.1. Adding Images for Use with Application Bar Buttons
      2. 7.2.2. Adding a Global Application Bar Using XAML
      3. 7.2.3. Adding a Local Application Bar Using XAML
      4. 7.2.4. Adding Menu Items
      5. 7.2.5. Adding an Application Bar Using Managed Code
    3. 7.3. Wiring Up Events to an Application Bar
      1. 7.3.1. Adding Glue Code and a Worker Function to the Add Button
      2. 7.3.2. Reacting to Add Button Events
      3. 7.3.3. Reacting to Save Button Events
      4. 7.3.4. Reacting to Menu Events
      5. 7.3.5. Adding Event Handlers with XAML
      6. 7.3.6. Using the ApplicationBar class to glue XAML and Managed Code
    4. 7.4. Summary
  13. 8. WebBrowser Control
    1. 8.1. Introducing the WebBrowser Control
    2. 8.2. Adding a WebBrowser Control
    3. 8.3. Using a WebBrowser Control to Display Web Content
    4. 8.4. Using a WebBrowser Control to Display Local HTML Content
    5. 8.5. Using a WebBrowser Control to Display Dynamic Content
    6. 8.6. Saving Web Pages Locally
    7. 8.7. Choosing Display and Security Settings
    8. 8.8. Viewport
      1. 8.8.1. CSS
      2. 8.8.2. Security
    9. 8.9. Summary
  14. 9. Working with Controls and Themes
    1. 9.1. Introducing the Metro Design System
      1. 9.1.1. Windows Phone Chrome
      2. 9.1.2. Screen Orientations
    2. 9.2. Themes on Windows Phone 7 Devices
      1. 9.2.1. Applying a Theme
        1. 9.2.1.1. Creating a User Interface
        2. 9.2.1.2. Adding Code to Draw an Elliptical Shape
      2. 9.2.2. Changing the Theme
      3. 9.2.3. Detecting the Currently Selected Theme
    3. 9.3. Panorama and Pivot Controls
      1. 9.3.1. Using the Panorama Control
      2. 9.3.2. Using the Pivot Control
    4. 9.4. Understanding Frame and Page Navigation
      1. 9.4.1. Creating a User Interface for NavigationTest Project
      2. 9.4.2. Adding Navigation Code
      3. 9.4.3. Adding Code to Pass Parameters Between Pages
    5. 9.5. Adding Transition Effects
      1. 9.5.1. Creating a User Interface
      2. 9.5.2. Downloading TiltEffect.cs and Applying Dependency Properties
    6. 9.6. Summary
  15. 10. Integrating Applications with the Windows Phone OS
    1. 10.1. Introducing Windows Phone 7 Launchers and Choosers
      1. 10.1.1. Launchers
      2. 10.1.2. Choosers
    2. 10.2. Working with Launchers and Choosers
      1. 10.2.1. Creating the User Interface
      2. 10.2.2. Coding Application Logic
    3. 10.3. Working with the Windows Phone 7 Application Life Cycle
      1. 10.3.1. Observing Application Life Cycle Events
        1. 10.3.1.1. Enhancing the User Interface
        2. 10.3.1.2. Adding Application Logic to Invoke WebBrowserTask Launcher and Log Events
        3. 10.3.1.3. Running the Application
      2. 10.3.2. Managing Application State
        1. 10.3.2.1. Managing State at the PhoneApplicationPage Level
        2. 10.3.2.2. Retrieving Application Initial State
      3. 10.3.3. Best Practices for Managing the Application Life Cycle on the Windows Phone 7 OS
    4. 10.4. Integrating with Facebook
      1. 10.4.1. A Few Words about OAuth
        1. 10.4.1.1. Enhancing the User Interface for Facebook Integration
        2. 10.4.1.2. Adding Application Logic to Post to Facebook
    5. 10.5. Integrating into Windows Phone 7 Hubs
      1. 10.5.1. Integrating your Application with Music and Video Hub
      2. 10.5.2. Integration with SharePoint
    6. 10.6. Summary
  16. 11. Creating Trial Applications
    1. 11.1. Understanding Trial and Full Modes
      1. 11.1.1. Using the IsTrial Method
        1. 11.1.1.1. Creating the User Interface
        2. 11.1.1.2. Coding Application Logic
      2. 11.1.2. Using the Marketplace APIs
        1. 11.1.2.1. Enhancing the User Interface
        2. 11.1.2.2. Enhancing Application Logic
      3. 11.1.3. Simulating Application Trial and Full Modes
    2. 11.2. Building a Trial Application
      1. 11.2.1. Building the User Interface
      2. 11.2.2. Connecting to a Web Service
      3. 11.2.3. Adding Page-to-Page Navigation
      4. 11.2.4. Verifying Trial and Full Mode
      5. 11.2.5. Adding Finishing Touches
    3. 11.3. Summary
  17. 12. Internationalization
    1. 12.1. Understanding Internationalization
    2. 12.2. Using Culture Settings with ToString to Display Dates, Times, and Text
    3. 12.3. Using the .NET Culture Hierarchy to Ensure Culture Neutrality
    4. 12.4. Storing and Retrieving Current Culture Settings
    5. 12.5. Using Resource Files to Localize Content
    6. 12.6. Summary
  18. 13. Isolated Storage
    1. 13.1. Working with Isolated Directory Storage
      1. 13.1.1. Creating the IsolatedStorageStoreImageDemo Project
      2. 13.1.2. Coding the User Interface
        1. 13.1.2.1. Selecting the UI Resources
        2. 13.1.2.2. Building the Main Page and Adding Components
      3. 13.1.3. Coding the Application
        1. 13.1.3.1. Specifying the Namespaces
        2. 13.1.3.2. Initializing Variables
        3. 13.1.3.3. Initializing the Application
        4. 13.1.3.4. Checking Availability of Isolated Storage Space
        5. 13.1.3.5. Adding a Button Event to Retrieve the Image from Isolated Storage
        6. 13.1.3.6. Adding a Method to Retrieve the Image from Isolated Storage
        7. 13.1.3.7. Testing the Finished Application
    2. 13.2. Working with Isolated Storage Settings
      1. 13.2.1. Creating a New Project
      2. 13.2.2. Building the Application UI (XAML)
        1. 13.2.2.1. Selecting the UI Resources
        2. 13.2.2.2. Building the Main Page and Adding Controls
      3. 13.2.3. Coding Application Behavior (C#)
        1. 13.2.3.1. Specifying the Namespaces
        2. 13.2.3.2. Initializing the Application
        3. 13.2.3.3. Adding the Save Button Event Handler
        4. 13.2.3.4. Adding the Delete Button Event Handler
        5. 13.2.3.5. Adding the Listbox Changed Event
        6. 13.2.3.6. Testing the Finished Application
    3. 13.3. Summary
  19. 14. Using Location Services
    1. 14.1. Understanding Windows Phone Location Services Architecture
    2. 14.2. Introducing the Windows Phone Location Service and Mapping APIs
    3. 14.3. Simulating the Location Service
      1. 14.3.1. Creating the GeoCoordinateWatcherDemo Project
      2. 14.3.2. Coding the User Interface
        1. 14.3.2.1. Declaring the UI Resources
        2. 14.3.2.2. Building the Main Page and Adding Components
      3. 14.3.3. Coding the Application
        1. 14.3.3.1. Specifying the Namespaces
        2. 14.3.3.2. Initializing Variables
        3. 14.3.3.3. Simulating GPS Data Using Reactive Extension's Observable
        4. 14.3.3.4. Displaying GPS Data
      4. 14.3.4. Testing the Finished Application
    4. 14.4. Using GeoCoordinateWatcher and the Bing Maps Control to Track Your Movements
      1. 14.4.1. Registering with the Bing Maps Service Portal and Installing the Bing Maps SDK
      2. 14.4.2. Creating the BingMapDemo Project
      3. 14.4.3. Coding the User Interface
        1. 14.4.3.1. Declaring the UI Resources
        2. 14.4.3.2. Building the Main Page and Adding a Bing Maps Control
      4. 14.4.4. Coding the Application
        1. 14.4.4.1. Specifying the Namespaces
        2. 14.4.4.2. Initializing Variables
        3. 14.4.4.3. Responding to StatusChanged and PositionChanged GeoCoordinateWatcher Events
        4. 14.4.4.4. Starting the Location Service: GeoCoordinateWatcher
        5. 14.4.4.5. Plotting the Location on the Bing Maps MapLayer
      5. 14.4.5. Testing the Finished Application
    5. 14.5. Plotting an Address on a Bing Maps Map and Working with the Bing Maps Service
      1. 14.5.1. Creating the AddressPlottingDemo Application
      2. 14.5.2. Adding a Service Reference to the Bing Maps GeoCodeService
      3. 14.5.3. Coding the User Interface
        1. 14.5.3.1. Declaring the UI Resources
        2. 14.5.3.2. Creating the Main Page
      4. 14.5.4. Coding the Application
        1. 14.5.4.1. Specifying the Namespaces
        2. 14.5.4.2. Initializing Variables
        3. 14.5.4.3. Handling the Button Event That Plots Address Data onto the Bing Maps Map
      5. 14.5.5. Testing the Finished Application
    6. 14.6. Summary
  20. 15. Media
    1. 15.1. Introducing MediaElement
    2. 15.2. Working with Video
      1. 15.2.1. Creating the MediaPlayerDemo Project
      2. 15.2.2. Building the User Interface
        1. 15.2.2.1. Declaring the UI Resources
        2. 15.2.2.2. Building the Main Page and Adding Media Player Components
      3. 15.2.3. Coding the Application
        1. 15.2.3.1. Specifying the Namespaces
        2. 15.2.3.2. Initializing Variables
        3. 15.2.3.3. Handling Video Download Progress
        4. 15.2.3.4. Handling Video Buffering
        5. 15.2.3.5. Showing Time Elapsed in the Media Player
        6. 15.2.3.6. Implementing the Pause Button
        7. 15.2.3.7. Implementing the Stop Button
        8. 15.2.3.8. Implementing the Play Button
        9. 15.2.3.9. Implementing the Mute Button
        10. 15.2.3.10. Implementing Seek
        11. 15.2.3.11. Implementing the MediaPlayerLauncher
        12. 15.2.3.12. Testing the Finished Application
    3. 15.3. Adding Sounds to an Application
      1. 15.3.1. Creating the RobotSoundDemo Project
      2. 15.3.2. Building the User Interface
        1. 15.3.2.1. Selecting the UI Resources
        2. 15.3.2.2. Adding Robot Animation to the Main Page Resource Section
        3. 15.3.2.3. Building the Main Page and Adding Components
      3. 15.3.3. Coding the Application
        1. 15.3.3.1. Specifying the Namespaces
        2. 15.3.3.2. Adding an Event to Handle Play Button Click
        3. 15.3.3.3. Testing the Finished Application
    4. 15.4. Summary
  21. 16. Working with the Camera and Photos
    1. 16.1. Introducing Windows Phone 7 Photo Features
      1. 16.1.1. Using a Chooser to Take Photos
        1. 16.1.1.1. Creating a New Project and Building the User Interface
        2. 16.1.1.2. Writing Code to Take Photos with CameraCaptureTask
      2. 16.1.2. Using a Chooser to Open Photos
      3. 16.1.3. Saving Photos to the Phone
        1. 16.1.3.1. Adding a Status Message
        2. 16.1.3.2. Writing Code to Save Photos with the XNA Framework
    2. 16.2. Integrating Your Application with Windows Phone 7
      1. 16.2.1. Using Extras to Launch an Application
        1. 16.2.1.1. Adding an Extras.xml File to the Project
        2. 16.2.1.2. Adding Code to Navigate to a Photo
      2. 16.2.2. Using Share to Upload PhotoCapture Snapshots to TwitPic
        1. 16.2.2.1. Adding an E0F0E49A-3EB1-4970-B780-45DA41EC7C28.xml File to the Project
        2. 16.2.2.2. Adding Code to Navigate to the Selected Photo
        3. 16.2.2.3. Adding an Upload Button to the UI
        4. 16.2.2.4. Writing Code to Transfer an Image to TwitPic
    3. 16.3. Summary
  22. 17. Push Notifications
    1. 17.1. Understanding Push Notifications
      1. 17.1.1. Toast Notifications
      2. 17.1.2. Tile Notifications
      3. 17.1.3. Raw Notifications
    2. 17.2. Introducing the Push Notifications Architecture
      1. 17.2.1. The Life Cycle of a Notification
      2. 17.2.2. The Push Notification Framework
    3. 17.3. Implementing Toast Notifications
      1. 17.3.1. Creating a Client Application
      2. 17.3.2. Creating an Application to Send Notifications
        1. 17.3.2.1. Verifying Delivery of Push Notifications
    4. 17.4. Implementing Tile Notifications
      1. 17.4.1. Creating a Client Application
      2. 17.4.2. Creating an Application to Send Notifications
        1. 17.4.2.1. Verifying Delivery of Push Notifications
    5. 17.5. Implementing Raw Notifications
      1. 17.5.1. Creating a Client Application
      2. 17.5.2. Creating an Application to Send Notifications
      3. 17.5.3. Testing Delivery of Raw Notifications
    6. 17.6. Implementing Cloud Service to Track Push Notifications
      1. 17.6.1. Creating a WCF Service to Track Notification Recipients
      2. 17.6.2. Modifying the Client to Call the WCF Service
      3. 17.6.3. Verifying Automated Push Notification Subscriber Tracking
    7. 17.7. Using Push Notifications in the Real World
    8. 17.8. Setting up Secure Web Services for Push Notifications
    9. 17.9. Summary
  23. 18. Reactive Extensions for .NET
    1. 18.1. Introducing Reactive Programming
    2. 18.2. Rx.NET Subscription Pipeline
    3. 18.3. Implementing the Observer Pattern with Rx.NET
      1. 18.3.1. Creating a Windows Phone Project
      2. 18.3.2. Adding Code to Create and Read Observable Collections
    4. 18.4. Using Rx.NET Event Handling to Search for Flickr Photographs
      1. 18.4.1. Creating a Windows Phone Project
      2. 18.4.2. Adding a User Interface
      3. 18.4.3. Adding Logic to Search Flickr for Images
      4. 18.4.4. Enhancing a Flickr Search with Throttling
      5. 18.4.5. Adding an Animation that Plays as Flickr Images Load
    5. 18.5. Rx.NET Design Guidelines
      1. 18.5.1. Consider Drawing a Marble Diagram
      2. 18.5.2. Consider Passing a Specific Scheduler to Concurrency Introducing Operators
    6. 18.6. Using Rx.NET with Web Services to Asynchronously Retrieve Weather Data
      1. 18.6.1. Creating a Windows Phone Project
      2. 18.6.2. Creating a User Interface
      3. 18.6.3. Adding Logic to Get Weather Information
    7. 18.7. Handling Errors in Rx.NET
    8. 18.8. Handling Data Connection Issues with Rx.NET
    9. 18.9. Revising WeatherRx to Manage Slow Data Connections
    10. 18.10. Handling Multiple Concurrent Requests with Rx.NET
    11. 18.11. Summary
  24. 19. Security
    1. 19.1. Understanding Application Security
      1. 19.1.1. Windows Phone Marketplace
        1. 19.1.1.1. Non-Repudiation: Proof of the Integrity and Origin of Data
        2. 19.1.1.2. Intellectual Property Protection
        3. 19.1.1.3. Safe Application Behavior
      2. 19.1.2. Submitting an Application to Windows Phone Marketplace
        1. 19.1.2.1. Generating a XAP Submission File
        2. 19.1.2.2. Uploading the XAP File to Marketplace
      3. 19.1.3. Sandboxed Execution and the Execution Manager
    2. 19.2. Implementing Network Security
      1. 19.2.1. Securing Connections with SSL
      2. 19.2.2. Testing and Opening an SSL Connection
      3. 19.2.3. Creating a Self-Signed Certificate
      4. 19.2.4. Exporting a Self-Signed Certificate
      5. 19.2.5. Installing Self-Signed Certificate on Windows Phone 7
    3. 19.3. Implementing Data Security
      1. 19.3.1. Using HMACSHA1 and HMACHSHA256
        1. 19.3.1.1. Creating a User Interface
        2. 19.3.1.2. Coding the Application Logic
      2. 19.3.2. Using Rfc2898DeriveBytes and AES to Encrypt Data
        1. 19.3.2.1. Creating a User Interface
        2. 19.3.2.2. Coding the Application Logic
    4. 19.4. Understanding Device Physical Security
    5. 19.5. Meeting Certification Requirements
      1. 19.5.1. Application Must Implement MSIL Code
      2. 19.5.2. Application Must Not Implement Any Security-Critical Code
        1. 19.5.2.1. Transparent Code
        2. 19.5.2.2. Security-Safe-Critical Code
        3. 19.5.2.3. Security-Critical code
      3. 19.5.3. Capability List
    6. 19.6. Obfuscating Your Application Code
    7. 19.7. Summary