Specifically designed to be an engaging and practical tutorial, Mastering Windows 8 C++ App Development will augment your skills and help you create high quality Windows Store apps.If you are a C++ developer who wants to utilize the combined power of COM, WinRT, C++/CX, and XAML to build Store apps for the new Windows 8 platform, then this book is for you. Prior experience with XAML-based technologies is not required.
Author(s): Pavel Yosifovich
Publisher: Packt Pub Limited
Year: 2013
Language: English
Pages: 304
Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Introduction to Windows 8 Apps
Introducing Windows 8
Touch everywhere
The Start (Home) screen
The AppBar
The Charms bar
Desktop apps versus Store apps
The Windows Runtime
Language projections
Building the user interface
Creating your first Store application
Closing an application
Application deployment
Where did int.ToString come from?
Project structure
Summary
COM and C++ for Windows 8 Store Apps
Welcome to C++11
New features in C++11
nullptr
auto
Lambdas
Smart pointers
Conclusion
COM and WinRT
The IUnknown interface
IInspectable interface
Creating a WinRT object
WinRT metadata
The Windows Runtime Library
C++/CX
Creating and managing objects
Accessing members
Methods and properties
Delegates
Events
Defining types and members
A WinRT component project
Adding properties and methods
Adding an event
Consuming a WinRT component
Building a C++ client
Building a C# client
The Application Binary Interface
Asynchronous operations
Using tasks for asynchronous operations
Cancelling asynchronous operations
Error handling
Using existing libraries
STL
MFC
ATL
Win32 API
CRT
DirectX
C++ AMP
The Windows Runtime class library
Strings
Collections
Exceptions
Summary
Building UI with XAML
XAML
XAML basics
Type converters
Complex properties
Dependency properties and attached properties
Content properties
Collection properties
Markup extensions
Naming elements
Connecting events to handlers
XAML rules summary
Introducing the Blend for Visual Studio 2012 tool
XAML compilation and execution
Connecting XAML, H, and CPP files to the build process
Resources
Binary resources
Logical resources
Managing logical resources
Duplicate keys
Styles
Implicit (automatic) styles
Style inheritance
Store application styles
Summary
Layout, Elements, and Controls
Introducing layout
Layout panels
StackPanel
Grid
Canvas
Adding children to a panel dynamically
VariableSizedWrapGrid
Panel virtualization
Virtualizing panels
Working with elements and controls
Content controls
Buttons
ScrollViewer
Other content controls to note
Collection-based controls
ListBox and ComboBox
ListView and GridView
FlipView
Text-based elements
Using custom fonts
TextBlock
TextBox
PasswordBox
RichTextBlock and RichEditBox
Images
The SemanticZoom control
Summary
Data Binding
Understanding data binding
Data binding concepts
Element-to-element binding
Object-to-element binding
Binding failures
Change notifications
Binding to collections
Customizing a data view
Value converters
Other parameters for Convert and ConvertBack
Data template selectors
Commands
Introduction to MVVM
MVVM constituents
Building an MVVM framework
More on MVVM
Summary
Components, Templates, and Custom Elements
Windows Runtime Components
Converting C++ to WinRT
Crossing the ABI
Consuming Windows Runtime Components
Other C++ library projects
Custom control templates
Building a control template
Using the control's properties
Handling state changes
Customizing using attached properties
Custom elements
User controls
Creating a color picker user control
Dependency properties
Defining dependency properties
Building the UI
Adding events
Using the ColorPicker
Custom controls
Creating a ColorPicker custom control
Binding in code
Custom panels
Custom drawn elements
Summary
Applications, Tiles, Tasks, and Notifications
Application lifecycle
Saving and restoring the state
Determining application execution states
State store options
Helper classes
Live tiles
Setting application tile defaults
Updating the tile's contents
Enabling cycle updates
Tile expiration
Badge updates
Creating secondary tiles
Activating a secondary tile
Using toast notifications
Toast options
Push notifications
Push notification architecture
Building a push notification application
The application server
Registering for push notifications
Issuing the push notification
Push notifications for secondary tiles
Background tasks
What is a task?
Creating and registering a task
Implementing a task
Task debugging
Task progress and cancellation
Playing background audio
Playing audio
Maintaining background audio
Sound-level notifications
Lock screen apps
Requesting to set a lock screen app
Other common operations for lock screen apps
Background tasks limits
Background transfers
Example – downloading a file
Summary
Contracts and Extensions
Capabilities
Contracts
Share contract
Share source
Share target
Sharing files
Sharing page UI generation
FileOpenPicker contract
Implementing a FileOpenPicker contract
Debugging contracts
Extensions
Settings extension
Other contracts and extensions
Summary
Packaging and the Windows Store
The application manifest
The application view state
Implementing view state changes
Packaging and validating
Using the Windows App Certification Kit
Summary
Index