Microsoft Silverlight Edition: Programming Windows Phone 7 by Charles PetzoldMicrosoft Silverlight Edition: Programming Windows Phone 7 by Charles Petzold

Microsoft Silverlight Edition: Programming Windows Phone 7

byCharles Petzold

Paperback | December 21, 2010

Pricing and Purchase Info


Earn 50 plum® points

Out of stock online

Not available in stores


NOTE: This book is the printed, Silverlight-focused edition of Programming Windows Phone 7, which is available as a free eBook from the Microsoft Download Center. A Microsoft XNA-focused edition is also available for sale in print (ISBN 978-0-7356-5669-7). The Microsoft eBook covers both Silverlight and XNA in one volume.

Bring your app ideas to life—with guidance from a Windows programming legend

Get started building your own apps and utilities for Windows Phone 7—expertly guided by award-winning author Charles Petzold. Focusing on Silverlight for Windows Phone 7 and the C# language, you'll learn how to extend your existing skills to this new mobile platform—mastering the core tools and techniques you need to get productive quickly. As always, Charles brings a unique combination of pragmatism and inspiration to his instruction—along with a wealth of hands-on examples.

Discover how to:

  • Customize page navigation and layout
  • Know when to use code vs. XAML markup
  • Capture and embed bitmaps, balancing performance issues
  • Support multi-touch input—including tap, drag, flick, and pinch
  • Work with accelerometer and location services
  • Experiment with panoramic and pivot controls
  • Create effects using built-in or custom animations
  • Manage state, tombstoning, data-binding, and storage
  • Write your own templates and custom controls
  • Test-drive your app on Windows Phone Emulator
Get code samples on the Web
  • For system requirements, see the Introduction.
Charles Petzold has been writing about programming for Windows-based operating systems for 24 years. A Microsoft MVP for Client Application Development and a Windows Pioneer Award winner, Petzold is author of the classic Programming Windows, currently in its fifth edition and one of the best-known programming books of all time; the wid...
Title:Microsoft Silverlight Edition: Programming Windows Phone 7Format:PaperbackDimensions:792 pages, 9 × 7.4 × 1.7 inPublished:December 21, 2010Publisher:Pearson EducationLanguage:English

The following ISBNs are associated with this title:

ISBN - 10:0735656673

ISBN - 13:9780735656673


Table of Contents

Introduction; Organization; My Assumptions About You; System Requirements; Using the Phone Emulator; Code Samples; Last-Minute Items; The Essential People; Errata & Book Support; We Want to Hear from You; Stay in Touch; Part I: The Basics; Chapter 1: Hello, Windows Phone 7; 1.1 Targeting Windows Phone 7; 1.2 The Hardware Chassis; 1.3 Sensors and Services; 1.4 File | New | Project; 1.5 A First Silverlight Phone Program; 1.6 The Standard Silverlight Files; 1.7 Color Themes; 1.8 Points and Pixels; 1.9 The XAP is a ZIP; 1.10 An XNA Program for the Phone; Chapter 2: Getting Oriented; 2.1 Silverlight and Dynamic Layout; 2.2 Orientation Events; 2.3 XNA Orientation; 2.4 Simple Clocks (Very Simple Clocks); Chapter 3: An Introduction to Touch; 3.1 Low-Level Touch Handling in XNA; 3.2 The XNA Gesture Interface; 3.3 Low-Level Touch Events in Silverlight; 3.4 The Manipulation Events; 3.5 Routed Events; 3.6 Some Odd Behavior?; Chapter 4: Bitmaps, Also Known as Textures; 4.1 XNA Texture Drawing; 4.2 The Silverlight Image Element; 4.3 Images Via the Web; 4.4 Image and ImageSource; 4.5 Loading Local Bitmaps from Code; 4.6 Capturing from the Camera; 4.7 The Phone's Photo Library; Chapter 5: Sensors and Services; 5.1 Accelerometer; 5.2 A Simple Bubble Level; 5.3 Geographic Location; 5.4 Using a Map Service; Chapter 6: Issues in Application Architecture; 6.1 Basic Navigation; 6.2 Passing Data to Pages; 6.3 Sharing Data Among Pages; 6.4 Retaining Data across Instances; 6.5 The Multitasking Ideal; 6.6 Task Switching on the Phone; 6.7 Page State; 6.8 Isolated Storage; 6.9 Xna Tombstoning and Settings; 6.10 Testing and Experimentation; Part II: Silverlight; Chapter 7: XAML Power and Limitations; 7.1 A TextBlock in Code; 7.2 Property Inheritance; 7.3 Property-Element Syntax; 7.4 Colors and Brushes; 7.5 Content and Content Properties; 7.6 The Resources Collection; 7.7 Sharing Brushes; 7.8 x:Key and x:Name; 7.9 An Introduction to Styles; 7.10 Style Inheritance; 7.11 Themes; 7.12 Gradient Accents; Chapter 8: Elements and Properties; 8.1 Basic Shapes; 8.2 Transforms; 8.3 Animating at the Speed of Video; 8.4 Handling Manipulation Events; 8.5 The Border Element; 8.6 TextBlock Properties and Inlines; 8.7 More on Images; 8.8 Playing Movies; 8.9 Modes of Opacity; 8.10 Non-Tiled Tile Brushes; Chapter 9: The Intricacies of Layout; 9.1 The Single-Cell Grid; 9.2 The StackPanel Stack; 9.3 Text Concatenation with StackPanel; 9.4 Nested Panels; 9.5 Visibility and Layout; 9.6 Two ScrollViewer Applications; 9.7 The Mechanism of Layout; 9.8 Inside the Panel; 9.9 A Single-Cell Grid Clone; 9.10 A Custom Vertical StackPanel; 9.11 The Retro Canvas; 9.12 Canvas and ZIndex; 9.13 The Canvas and Touch; 9.14 The Mighty Grid; Chapter 10: The App Bar and Controls; 10.1 ApplicationBar Icons; 10.2 Jot and Application Settings; 10.3 Jot and Touch; 10.4 Jot and the ApplicationBar; 10.5 Elements and Controls; 10.6 RangeBase and Slider; 10.7 The Basic Button; 10.8 The Concept of Content; 10.9 Theme Styles and Precedence; 10.10 The Button Hierarchy; 10.11 Toggling a Stopwatch; 10.12 Buttons and Styles; 10.13 TextBox and Keyboard Input; Chapter 11: Dependency Properties; 11.1 The Problem Illustrated; 11.2 The Dependency Property Difference; 11.3 Deriving from UserControl; 11.4 A New Type of Toggle; 11.5 Panels with Properties; 11.6 Attached Properties; Chapter 12: Data Bindings; 12.1 Source and Target; 12.2 Target and Mode; 12.3 Binding Converters; 12.4 Relative Source; 12.5 The "this" Source; 12.6 Notification Mechanisms; 12.7 A Simple Binding Server; 12.8 Setting the DataContext; 12.9 Simple Decision Making; 12.10 Converters with Properties; 12.11 Give and Take; 12.12 TextBox Binding Updates; Chapter 13: Vector Graphics; 13.1 The Shapes Library; 13.2 Canvas and Grid; 13.3 Overlapping and ZIndex; 13.4 Polylines and Custom Curves; 13.5 Caps, Joins, and Dashes; 13.6 Polygon and Fill; 13.7 The Stretch Property; 13.8 Dynamic Polygons; 13.9 The Path Element; 13.10 Geometries and Transforms; 13.11 Grouping Geometries; 13.12 The Versatile PathGeometry; 13.13 The ArcSegment; 13.14 Bézier Curves; 13.15 The Path Markup Syntax; 13.16 How This Chapter Was Created; Chapter 14: Raster Graphics; 14.1 The Bitmap Class Hierarchy; 14.2 WriteableBitmap and UIElement; 14.3 The Pixel Bits; 14.4 Vector Graphics on a Bitmap; 14.5 Images and Tombstoning; 14.6 Saving to the Picture Library; 14.7 Becoming a Photo Extras Application; Chapter 15: Animations; 15.1 Frame-Based vs. Time-Based; 15.2 Animation Targets; 15.3 Click and Spin; 15.4 Some Variations; 15.5 XAML-Based Animations; 15.6 A Cautionary Tale; 15.7 Key Frame Animations; 15.8 Trigger on Loaded; 15.9 Animating Attached Properties (or Not); 15.10 Splines and Key Frames; 15.11 The Bouncing Ball Problem; 15.12 The Easing Functions; 15.13 Animating Perspective Transforms; 15.14 Animations and Property Precedence; Chapter 16: The Two Templates; 16.1 ContentControl and DataTemplate; 16.2 Examining the Visual Tree; 16.3 ControlTemplate Basics; 16.4 The Visual State Manager; 16.5 Sharing and Reusing Styles and Templates; 16.6 Custom Controls in a Library; 16.7 Variations on the Slider; 16.8 The Ever-Handy Thumb; 16.9 Custom Controls; Chapter 17: Items Controls; 17.1 Items Controls and Visual Trees; 17.2 Customizing Item Displays; 17.3 ListBox Selection; 17.4 Binding to ItemsSource; 17.5 Databases and Business Objects; 17.6 Fun with DataTemplates; 17.7 Sorting; 17.8 Changing the Panel; 17.9 The DataTemplate Bar Chart; 17.10 A Card File Metaphor; Chapter 18: Pivot and Panorama; 18.1 Compare and Contrast; 18.2 Music by Composer; 18.3 The XNA Connection; 18.4 The XNA Music Classes: MediaLibrary; 18.5 Displaying the Albums; 18.6 The XNA Music Classes: MediaPlayer;