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. About This eBook
  2. Title Page
  3. Copyright Page
  4. Praise for Programming the Windows Runtime by Example
  5. Dedication Page
  6. Contents at a Glance
  7. Contents
  8. Foreword
  9. Preface
    1. What This Book Is About
    2. Where to Access the Source Code
    3. How to Use This Book
  10. Acknowledgments
  11. About the Authors
  12. 1. The New Windows Runtime
    1. Windows Runtime Specifics
    2. Windows Store Apps
    3. .NET and WinRT
    4. Desktop Applications
    5. Example: Examine Projections in a WinRT Component
    6. Asynchronous Functions
    7. Summary
  13. 2. Windows Store Apps and WinRT Components
    1. Fundamentals of a Windows Store App
    2. Application Lifecycle
    3. Managed WinRT Components
    4. Summary
  14. 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
  15. 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
  16. 5. Web Services and Syndication
    1. SOAP
    2. REST
    3. OData Client
    4. Syndication
    5. Summary
  17. 6. Tiles and Toasts
    1. Tiles
    2. Badges
    3. Periodic Notifications
    4. Toasts
    5. Push Notifications
    6. Summary
  18. 7. Connecting to the Cloud
    1. Windows Azure Mobile Services
    2. Live Connect
    3. Summary
  19. 8. Security
    1. Authentication
    2. Encryption and Signing
    3. Summary
  20. 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
  21. 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
  22. 11. Windows Charms Integration
    1. Displaying App Settings
    2. Sharing
    3. Using Play To
    4. Summary
  23. 12. Additional Windows Integration
    1. Integrating with the File and Contact Pickers
    2. Application Activation Integration
    3. Working with Contacts and Appointments
    4. Summary
  24. 13. Devices
    1. Working with Input Devices
    2. Sensor Input
    3. Summary
  25. 14. Printers and Scanners
    1. Working with Printers
    2. Working with Scanners
    3. Summary
  26. 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
  27. 16. Multimedia
    1. Playing Multimedia Content
    2. Acquiring Audio and Video
    3. Text-to-Speech Support
    4. Summary
  28. 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
  29. 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
  30. 19. Packaging and Deploying
    1. Packaging Your App
    2. Deploying Your App
    3. Making Money with Your App in the Windows Store
    4. Summary
  31. 20. Debugging and Performance Optimization
    1. Understanding the Debugger
    2. Logging and Tracing
    3. Profiling and Performance Analysis
    4. Code Analysis
    5. Summary
  32. A. Under the Covers
    1. Fundamental WinRT Concepts
    2. Namespaces
    3. Base Types
    4. Primitives
    5. Classes and Class Methods
    6. Structures
    7. Generics
    8. Null
    9. Enumerations
    10. Interfaces
    11. Properties
    12. Delegates
    13. Events
    14. Arrays
    15. WinRT Internals
  33. B. Glossary
  34. Index

Product information

  • Title: Programming the Windows Runtime by Example: A Comprehensive Guide to WinRT with Examples in C# and XAML
  • Author(s): Jeremy Likness, John Garland
  • Release date: June 2014
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780133430448