You are previewing Microsoft® Silverlight® Edition: Programming Windows® Phone 7.
O'Reilly logo
Microsoft® Silverlight® Edition: Programming Windows® Phone 7

Book Description

Get started building applications for Windows Phone 7—expertly guided by award-winning author Charles Petzold. You’ll focus on the core concepts and techniques for creating apps with Microsoft Silverlight. Charles brings a unique combination of pragmatism and authority to his instruction—along with an eminently readable style and a wealth of hands-on examples.

Table of Contents

  1. Microsoft Silverlight Edition: Programming Windows Phone 7
    1. A Note Regarding Supplemental Files
    2. Introduction
      1. Organization
      2. My Assumptions About You
      3. System Requirements
      4. Using the Phone Emulator
      5. Code Samples
      6. Last-Minute Items
      7. The Essential People
      8. Errata & Book Support
      9. We Want to Hear from You
      10. Stay in Touch
    3. I. The Basics
      1. 1. Hello, Windows Phone 7
        1. Targeting Windows Phone 7
        2. The Hardware Chassis
        3. Sensors and Services
        4. File | New | Project
        5. A First Silverlight Phone Program
        6. The Standard Silverlight Files
        7. Color Themes
        8. Points and Pixels
        9. The XAP is a ZIP
        10. An XNA Program for the Phone
      2. 2. Getting Oriented
        1. Silverlight and Dynamic Layout
        2. Orientation Events
        3. XNA Orientation
        4. Simple Clocks (Very Simple Clocks)
      3. 3. An Introduction to Touch
        1. Low-Level Touch Handling in XNA
        2. The XNA Gesture Interface
        3. Low-Level Touch Events in Silverlight
        4. The Manipulation Events
        5. Routed Events
        6. Some Odd Behavior?
      4. 4. Bitmaps, Also Known as Textures
        1. XNA Texture Drawing
        2. The Silverlight Image Element
        3. Images Via the Web
        4. Image and ImageSource
        5. Loading Local Bitmaps from Code
        6. Capturing from the Camera
        7. The Phone’s Photo Library
      5. 5. Sensors and Services
        1. Accelerometer
        2. A Simple Bubble Level
        3. Geographic Location
        4. Using a Map Service
      6. 6. Issues in Application Architecture
        1. Basic Navigation
        2. Passing Data to Pages
        3. Sharing Data Among Pages
        4. Retaining Data across Instances
        5. The Multitasking Ideal
        6. Task Switching on the Phone
        7. Page State
        8. Isolated Storage
        9. Xna Tombstoning and Settings
        10. Testing and Experimentation
    4. II. Silverlight
      1. 7. XAML Power and Limitations
        1. A TextBlock in Code
        2. Property Inheritance
        3. Property-Element Syntax
        4. Colors and Brushes
        5. Content and Content Properties
        6. The Resources Collection
        7. Sharing Brushes
        8. x:Key and x:Name
        9. An Introduction to Styles
        10. Style Inheritance
        11. Themes
        12. Gradient Accents
      2. 8. Elements and Properties
        1. Basic Shapes
        2. Transforms
        3. Animating at the Speed of Video
        4. Handling Manipulation Events
        5. The Border Element
        6. TextBlock Properties and Inlines
        7. More on Images
        8. Playing Movies
        9. Modes of Opacity
        10. Non-Tiled Tile Brushes
      3. 9. The Intricacies of Layout
        1. The Single-Cell Grid
        2. The StackPanel Stack
        3. Text Concatenation with StackPanel
        4. Nested Panels
        5. Visibility and Layout
        6. Two ScrollViewer Applications
        7. The Mechanism of Layout
        8. Inside the Panel
        9. A Single-Cell Grid Clone
        10. A Custom Vertical StackPanel
        11. The Retro Canvas
        12. Canvas and ZIndex
        13. The Canvas and Touch
        14. The Mighty Grid
      4. 10. The App Bar and Controls
        1. ApplicationBar Icons
        2. Jot and Application Settings
        3. Jot and Touch
        4. Jot and the ApplicationBar
        5. Elements and Controls
        6. RangeBase and Slider
        7. The Basic Button
        8. The Concept of Content
        9. Theme Styles and Precedence
        10. The Button Hierarchy
        11. Toggling a Stopwatch
        12. Buttons and Styles
        13. TextBox and Keyboard Input
      5. 11. Dependency Properties
        1. The Problem Illustrated
        2. The Dependency Property Difference
        3. Deriving from UserControl
        4. A New Type of Toggle
        5. Panels with Properties
        6. Attached Properties
      6. 12. Data Bindings
        1. Source and Target
        2. Target and Mode
        3. Binding Converters
        4. Relative Source
        5. The “this” Source
        6. Notification Mechanisms
        7. A Simple Binding Server
        8. Setting the DataContext
        9. Simple Decision Making
        10. Converters with Properties
        11. Give and Take
        12. TextBox Binding Updates
      7. 13. Vector Graphics
        1. The Shapes Library
        2. Canvas and Grid
        3. Overlapping and ZIndex
        4. Polylines and Custom Curves
        5. Caps, Joins, and Dashes
        6. Polygon and Fill
        7. The Stretch Property
        8. Dynamic Polygons
        9. The Path Element
        10. Geometries and Transforms
        11. Grouping Geometries
        12. The Versatile PathGeometry
        13. The ArcSegment
        14. Bézier Curves
        15. The Path Markup Syntax
        16. How This Chapter Was Created
      8. 14. Raster Graphics
        1. The Bitmap Class Hierarchy
        2. WriteableBitmap and UIElement
        3. The Pixel Bits
        4. Vector Graphics on a Bitmap
        5. Images and Tombstoning
        6. Saving to the Picture Library
        7. Becoming a Photo Extras Application
      9. 15. Animations
        1. Frame-Based vs. Time-Based
        2. Animation Targets
        3. Click and Spin
        4. Some Variations
        5. XAML-Based Animations
        6. A Cautionary Tale
        7. Key Frame Animations
        8. Trigger on Loaded
        9. Animating Attached Properties (or Not)
        10. Splines and Key Frames
        11. The Bouncing Ball Problem
        12. The Easing Functions
        13. Animating Perspective Transforms
        14. Animations and Property Precedence
      10. 16. The Two Templates
        1. ContentControl and DataTemplate
        2. Examining the Visual Tree
        3. ControlTemplate Basics
        4. The Visual State Manager
        5. Sharing and Reusing Styles and Templates
        6. Custom Controls in a Library
        7. Variations on the Slider
        8. The Ever-Handy Thumb
        9. Custom Controls
      11. 17. Items Controls
        1. Items Controls and Visual Trees
        2. Customizing Item Displays
        3. ListBox Selection
        4. Binding to ItemsSource
        5. Databases and Business Objects
        6. Fun with DataTemplates
        7. Sorting
        8. Changing the Panel
        9. The DataTemplate Bar Chart
        10. A Card File Metaphor
      12. 18. Pivot and Panorama
        1. Compare and Contrast
        2. Music by Composer
        3. The XNA Connection
        4. The XNA Music Classes: MediaLibrary
        5. Displaying the Albums
        6. The XNA Music Classes: MediaPlayer
    5. Index
    6. About the Author