Windows® 8.1 Apps with XAML and C# Sams Teach Yourself in 24 Hours

Book description

Learn how to build great Windows Store apps! Figures and code appear as they do in Visual Studio.

In just 24 sessions of one hour or less, Sams Teach Yourself Windows 8.1 Apps with XAML and C# in 24 Hours will help you build compelling apps for Windows 8.1 devices of all kinds. Using this book’s straightforward approach, you’ll learn to design and build apps, create flexible user interfaces, handle inputs, integrate controls, and more. Step by step, you’ll discover how to leverage XAML’s visual richness and the immense power of Windows 8.1. Every lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!


Step-by-step instructions carefully walk you through today’s most common XAML and C# development tasks.
Quizzes at the end of each chapter help you test your knowledge.
Notes present interesting information related to the discussion.
Tips offer advice or show you easier ways to perform tasks.
Cautions alert you to possible problems and give you advice on how to avoid them.


Learn how to…

  • Create user interfaces that adapt to any device, from tablets to high-def TVs

  • Handle input from touch, mouse, pen, and keyboard

  • Manage the entire Windows 8.1 app lifecycle and all execution states

  • Master powerful XAML controls for text, images, audio, video, and more

  • Integrate vector graphics that scale perfectly to any size

  • Apply rich animations

  • Work with styles, templates, and visual states

  • Exploit the Windows charms within your apps

  • Take full advantage of data binding and contracts

  • Read data from sensors and control external devices

  • Provide dynamic updates via live tiles, notifications, and the lock screen

  • Discover the many ways to monetize your Windows Store apps

  • Table of contents

    1. About This eBook
    2. Title Page
    3. Copyright Page
    4. Contents at a Glance
    5. Table of Contents
    6. About the Author
    7. Dedication
    8. Acknowledgments
    9. We Want to Hear from You!
    10. Reader Services
    11. Introduction
      1. Who Should Read This Book?
      2. Software Requirements
      3. Code Examples
    12. Part I: Getting Started
      1. Hour 1. Preparing for Development
        1. Creating, Deploying, and Profiling an App
        2. Understanding the App Package
        3. Submitting to the Windows Store
        4. Further Exploration
        5. Summary
        6. Q&A
        7. Workshop
      2. Hour 2. Discovering the XAML Language
        1. What Is XAML, Exactly?
        2. Elements and Attributes
        3. Namespaces
        4. Property Elements
        5. Type Converters
        6. Markup Extensions
        7. Children of Object Elements
        8. Mixing XAML with C#
        9. Updating the Hour1 Project
        10. Making Your App World-Ready
        11. Making Your App Accessible
        12. Further Exploration
        13. Summary
        14. Q&A
        15. Workshop
        16. Exercises
    13. Part II: Building an App
      1. Hour 3. Arranging UI Elements
        1. Controlling Size
        2. Controlling Position
        3. Applying 2D Transforms
        4. Applying 3D Transforms
        5. Further Exploration
        6. Summary
        7. Q&A
        8. Workshop
        9. Exercises
      2. Hour 4. Mastering Layout
        1. Discovering Your Window Size and Location
        2. Panels
        3. Handling Content Overflow
        4. Further Exploration
        5. Summary
        6. Q&A
        7. Workshop
      3. Hour 5. Handling Input: Touch, Mouse, Pen, and Keyboard
        1. Touch Input
        2. Mouse Input
        3. Pen Input
        4. Keyboard Input
        5. Further Exploration
        6. Summary
        7. Q&A
        8. Workshop
      4. Hour 6. Managing the App Lifecycle
        1. Killing
        2. Suspending
        3. Resuming
        4. Terminating
        5. Launching
        6. Activating
        7. Managing Session State with SuspensionManager
        8. Programmatically Launching Apps
        9. Further Exploration
        10. Summary
        11. Q&A
        12. Workshop
      5. Hour 7. Threading, Windows, and Pages
        1. Understanding the Threading Model
        2. Displaying Multiple Windows
        3. Navigating Between Pages
        4. Further Exploration
        5. Summary
        6. Q&A
        7. Workshop
    14. Part III: Understanding Controls
      1. Hour 8. Content Controls
        1. Button
        2. AppBarButton
        3. HyperlinkButton
        4. RepeatButton
        5. ToggleButton
        6. AppBarToggleButton
        7. CheckBox
        8. RadioButton
        9. ToolTip
        10. App Bars
        11. Summary
        12. Q&A
        13. Workshop
        14. Exercises
      2. Hour 9. Items Controls
        1. Items in the Control
        2. Items Panels
        3. ComboBox
        4. ListBox
        5. ListView
        6. GridView
        7. FlipView
        8. SemanticZoom
        9. MenuFlyout
        10. Summary
        11. Q&A
        12. Workshop
        13. Exercises
      3. Hour 10. Text
        1. TextBlock
        2. RichTextBlock
        3. TextBox
        4. RichEditBox
        5. PasswordBox
        6. Further Exploration
        7. Summary
        8. Q&A
        9. Workshop
        10. Exercises
      4. Hour 11. Images
        1. The Image Element
        2. Multiple Files for Multiple Environments
        3. Decoding Images
        4. Encoding Images
        5. Rendering PDF Content as an Image
        6. Further Exploration
        7. Summary
        8. Q&A
        9. Workshop
        10. Exercises
      5. Hour 12. Audio, Video, and Speech
        1. Playing Media
        2. Capturing Media
        3. Transcoding Media
        4. Speech Synthesis
        5. Further Exploration
        6. Summary
        7. Q&A
        8. Workshop
      6. Hour 13. Other Controls
        1. Range Controls
        2. SearchBox
        3. Popup Controls
        4. Hub
        5. Date and Time Controls
        6. ProgressRing
        7. ToggleSwitch
        8. WebView
        9. Further Exploration
        10. Summary
        11. Workshop
    15. Part IV: Leveraging the Richness of XAML
      1. Hour 14. Vector Graphics
        1. Shapes
        2. Geometries
        3. Brushes
        4. Further Exploration
        5. Summary
        6. Q&A
        7. Workshop
        8. Exercises
      2. Hour 15. Animation
        1. Theme Transitions
        2. Theme Animations
        3. Custom Animations
        4. Custom Keyframe Animations
        5. Easing Functions
        6. Manual Animations
        7. Further Exploration
        8. Summary
        9. Q&A
        10. Workshop
        11. Exercises
      3. Hour 16. Styles, Templates, and Visual States
        1. Styles
        2. Templates
        3. Visual States
        4. Summary
        5. Q&A
        6. Workshop
        7. Exercises
      4. Hour 17. Data Binding
        1. Introducing Binding
        2. Controlling Rendering
        3. Customizing the View of a Collection
        4. High-Performance Rendering with ListView and GridView
        5. Summary
        6. Q&A
        7. Workshop
    16. Part V: Exploiting Windows 8.1
      1. Hour 18. Working with Data
        1. An Overview of Files and Folders
        2. App Data
        3. User Data
        4. Networking
        5. Further Exploration
        6. Summary
        7. Q&A
        8. Workshop
      2. Hour 19. Supporting Charms
        1. The Search Charm
        2. The Share Charm
        3. The Devices Charm
        4. The Settings Charm
        5. Summary
        6. Workshop
        7. Exercises
      3. Hour 20. Leveraging Contracts
        1. Account Picture Provider
        2. AutoPlay Content and AutoPlay Device
        3. File Type Associations
        4. Protocol
        5. File Open Picker
        6. File Save Picker
        7. Contact Picker
        8. The Contact Contract
        9. The Appointments Provider Contract
        10. Background Tasks
        11. Further Exploration
        12. Summary
        13. Q&A
        14. Workshop
      4. Hour 21. Reading from Sensors
        1. Accelerometer
        2. Gyrometer
        3. Inclinometer
        4. Compass
        5. Light Sensor
        6. Orientation
        7. Location
        8. Proximity
        9. Summary
        10. Workshop
      5. Hour 22. Controlling Devices
        1. Fingerprint Readers
        2. Image Scanners
        3. Barcode Scanners
        4. Magnetic Stripe Readers
        5. Custom Bluetooth Devices
        6. Custom Bluetooth Smart Devices
        7. Custom USB Devices
        8. Custom HID Devices
        9. Custom Wi-Fi Direct Devices
        10. Further Exploration
        11. Summary
        12. Workshop
        13. Exercises
      6. Hour 23. Live Tiles, Notifications, and the Lock Screen
        1. Live Tiles
        2. Badges
        3. Secondary Tiles
        4. Toast Notifications
        5. Setting Up Push Notifications
        6. The Lock Screen
        7. Further Exploration
        8. Summary
        9. Workshop
        10. Exercises
      7. Hour 24. Earning Money
        1. Adding Advertisements to Your App
        2. Supporting a Free Trial
        3. Supporting In-App Purchases
        4. Validating Windows Store Receipts
        5. Testing Windows Store Features
        6. Further Exploration
        7. Summary
        8. Q&A
        9. Workshop
    17. Index
    18. Where Are the Companion Content Files?

    Product information

    • Title: Windows® 8.1 Apps with XAML and C# Sams Teach Yourself in 24 Hours
    • Author(s): Adam Nathan
    • Release date: May 2014
    • Publisher(s): Sams
    • ISBN: 9780133791648