You are previewing Programming the Windows Runtime by Example: A Comprehensive Guide to WinRT with Examples in C# and XAML.
O'Reilly logo
Programming the Windows Runtime by Example: A Comprehensive Guide to WinRT with Examples in C# and XAML

Book Description

Master Windows 8.1/Windows Runtime Programming Through 80 Expert Projects
This is the most complete, hands-on, solutions-focused guide to programming modern Windows applications with the Windows Runtime.

Leading Windows development consultants Jeremy Likness and John Garland present easy-to-adapt C# and XAML example code for more than 80 projects. Their real-world application examples help you apply Windows 8.1’s best improvements, including large tiles, the new search control, flyouts, command bars, native WinRT networking, and new deployment and sideloading options.

Drawing on their pioneering experience, they illuminate key areas of the Windows Runtime API, offering uniquely detailed coverage of encryption, cloud connectivity, devices, printers, and media integration. You’ll find cutting-edge tips and tricks available in no other book.

This is an indispensable resource for all intermediate-to-advanced Windows developers, and for any architect building desktop, tablet, or mobile solutions with Microsoft technologies. Its focus on both C# and XAML will make it valuable to millions of Windows developers already familiar with Silverlight, WPF, and/or .NET.

Coverage includes
• Creating robust app interfaces with the newest XAML controls, including flyouts and command bars
• Saving data in a persistent “roaming zone” for syncing across Windows 8.1 devices
• Using Visual State Manager (VSM) to build apps that adapt to various device resolutions and orientations
• Integrating virtually any form of data into your apps
• Connecting with web services, RSS, Atom feeds, and social networks
• Securing apps via authentication, encrypting, signing, and single sign-on with Microsoft Account, Facebook, Google, and more
• Leveraging Windows 8.1 media enhancements that improve battery life and app performance
• Networking more effectively with Windows 8.1’s revamped HTTP implementation and new location APIs
• Using Tiles and Toasts to keep apps alive and connected, even when they aren’t running
• Enabling users to send content between devices via NFC tap and send
• Ensuring accessibility and globalizing your apps
• Efficiently debugging, optimizing, packaging, and deploying your apps
• Building sideloadable apps that don’t have to be published in Windows Store

“This book doesn’t just focus on singular concepts, it also provides end-to-end perspective on building an app in WinRT. It is one of those essential tools for Windows developers that will help you complete your software goals sooner than without it!”
—Tim Heuer, Principal Program Manager Lead, XAML Platform, Microsoft Corporation

Table of Contents

  1. Table of Contents
  2. Introduction [This content is currently in development.]
  3. 1. The New Windows Runtime
    1. Windows Store Apps
    2. .NET and WinRT
    3. Desktop Applications
    4. Example: Examine Projections in a WinRT Component
    5. Asynchronous Functions
    6. Summary
  4. 2. Windows Store Apps and WinRT Components
    1. Fundamentals of a Windows Store app
    2. Application Lifecycle
    3. Managed WinRT Components
    4. Summary
  5. 3. Layouts and Controls
    1. The Visual Tree
    2. Data-Binding
    3. Animations
    4. The Visual State Manager
    5. The Visual State Manager Workflow
    6. Programmatic Access to Visual States
    7. Custom Visual State Managers
    8. Styles
    9. Templates
    10. Layouts
    11. Controls
    12. Custom Controls
    13. Parsing XAML
    14. HTML Pages
    15. Summary
  6. 4. Data and Content
    1. Example: Data Manipulation with the “Skrape” App
    2. The Clipboard
    3. Application Storage
    4. Storage Folders and Files
    5. Data Formats
    6. Document Data
    7. Summary
  7. 5. Web Services and Syndication
    1. SOAP
    2. REST
    3. OData Client
    4. Syndication
    5. Summary
  8. 6. Tiles and Toasts
    1. Tiles
    2. Badges
    3. Periodic Notifications
    4. Toasts
    5. Push Notifications
    6. Summary
  9. 7. Connecting to the Cloud
    1. Windows Azure Mobile Services
    2. Live Connect
    3. Summary
  10. 8. Security
    1. Authentication
    2. Encryption and Signing
    3. Summary
  11. 9. Model-View-ViewModel (MVVM)
    1. UI Design Patterns
    2. The ViewModel Decomposed
    3. Common MVVM Misperceptions
    4. Benefits of MVVM
    5. Common MVVM Solutions
    6. Summary
  12. 10. Networking
    1. Web and HTTP
    2. HomeGroup
    3. Connectivity and Data Plans
    4. Sockets
    5. Proximity (Near Field Communications)
    6. Background Transfers
    7. Summary
  13. 11. Windows Charms Integration
    1. Displaying App Settings
    2. Sharing
    3. Using Play To
    4. Summary
  14. 12. Additional Windows Integration
    1. Integrating with the File and Contact Pickers
    2. Application Activation Integration
    3. Working with Contacts and Appointments
    4. Summary
  15. 13. Devices
    1. Working with Input Devices
    2. Sensor Input
    3. Summary
  16. 14. Printers and Scanners
    1. Working with Printers
    2. Working with Scanners
    3. Summary
  17. 15. Background Tasks
    1. The Thread Pool
    2. Uploads and Downloads
    3. Audio
    4. Lock Screen Tasks
    5. Raw Push Notifications
    6. Control Channel
    7. System Events
    8. Summary
  18. 16. Multimedia
    1. Playing Multimedia Content
    2. Acquiring Audio and Video
    3. Text-to-Speech Support
    4. Summary
  19. 17. Accessibility
    1. Requested Theme
    2. Keyboard Support
    3. Automation Properties
    4. Testing with Narrator
    5. Automation and Lists
    6. Live Settings
    7. Automation Peers
    8. Accessibility Checker
    9. Summary
  20. 18. Globalization and Localization
    1. Design Considerations
    2. Default Language
    3. Configuring Preferred Languages
    4. Resource Qualification and Matching
    5. Localizing XAML Elements
    6. Formatting Dates, Numbers, and Currencies for Locale
    7. MVVM and Localization
    8. Multilingual Toolkit
    9. Summary
  21. 19. Packaging and Deploying [This content is currently in development.]
  22. 20. Debugging and Performance Optimization
    1. Understanding the Debugger
    2. Logging and Tracing
    3. Profiling and Performance Analysis
    4. Code Analysis
    5. Summary
  23. A. Under the Covers
    1. Fundamental WinRT Concepts
    2. WinRT Internals
  24. Glossary [This content is currently in development.]