Hilo table of contents (Windows Store apps using C++ and XAML)
From: Developing an end-to-end Windows Store app using C++ and XAML: Hilo
Download
After you download the code, see Getting started with Hilo for instructions.
Table of contents
- Developing an end-to-end Windows Store app using C++ and XAML: Hilo Prerequisites Table of contents at a glance Why XAML? Learning resources
- Getting started with Hilo (Windows Store apps using C++ and XAML) Building and running the sample Projects and solution folders The development tools and languages
- Designing Hilo's UX (Windows Store apps using C++ and XAML) Deciding the UX goals Brainstorming the user experience What's Hilo great at? Deciding the app flow Deciding what Windows 8 features to use Other features to consider Deciding how to sell the app Making a good first impression Prototyping and validating the design
- Writing modern C++ code in Hilo (Windows Store apps using C++ and XAML) Understanding the app's environment The package manifest C++ standard libraries Windows Runtime libraries Microsoft Win32 and Component Object Model (COM) API Parallel Patterns Library (PPL) XAML Visual Studio project templates C++ language extensions for interop The C++ compiler and linker Certification process of the Windows Store Deployment Using C++11, standard C++ libraries, and a modern coding style Lambda expressions Stack semantics, smart pointers, and RAII Automatic type deduction Range-based for loops Standard algorithms and containers Free-form iterators The pimpl idiom Exception handling Adapting to async programming Using parallel programming and background tasks Tips for using C++/CX as an interop layer Be aware of overhead for type conversion Call methods of ref classes from the required thread Mark destructors of public ref classes as virtual Use ref classes only for interop Use techniques that minimize marshaling costs Use the Object Browser to understand your app's .winmd output If C++/CX doesn't meet your needs, consider WRL for low-level interop Don't confuse C++/CX language extensions with C++/CLI Don't try to expose internal types in public ref classes Tips for managing memory Use smart pointers Use stack semantics and the RAII pattern Don't keep objects around longer than you need Avoid circular references Debugging tips and techniques Use breakpoints and tracepoints Use OutputDebugString for "printf" style debugging Break when exceptions are thrown Use the parallel debugging windows Use the simulator and remote debugging to debug specific hardware configurations Porting existing C++ code Overview of the porting process Compile and test the code on Windows 8 Identify unsupported library functions Use functions from the Window Runtime API reference Replace synchronous library functions with async versions Convert long running operations in your code to async versions Validate the package with the Windows App Certification Kit Overview of supported functions Porting from Win32-based UI Porting DirectX Porting MFC Using the C++ run-time library (CRT) Using the C++ Standard Library Using ATL Porting guidance Port all existing code, including libraries Link to static libraries or import libraries as usual Use C++/CX or WRL if your library needs to invoke Winrt functions Use reg-free COM for activation Convert to Windows Runtime types when marshaling cost is an issue Decide between using wrapper code and converting existing code For more info about porting
- Async programming patterns and tips in Hilo (Windows Store apps using C++ and XAML) Ways to use the continuation chain pattern Value-based and task-based continuations Unwrapped tasks Allowing continuation chains to be externally canceled Other ways of signaling cancellation Canceling asynchronous operations that are wrapped by tasks Using task-based continuations for exception handling Assembling the outputs of multiple continuations Using nested continuations for conditional logic Showing progress from an asynchronous operation Creating background tasks with create_async for interop scenarios Dispatching functions to the main thread Using the Asynchronous Agents Library Tips for async programming in Windows Store apps using C++ Don't program with threads directly Use "Async" in the name of your async functions Wrap all asynchronous operations of the Windows Runtime with PPL tasks Return PPL tasks from internal async functions within your app Return IAsyncInfo-derived interfaces from public async methods of public ref classes Use public ref classes only for interop Use modern, standard C++, including the std namespace Use task cancellation consistently Handle task exceptions using a task-based continuation Handle exceptions locally when using the when_all function Call view model objects only from the main thread Use background threads whenever possible Don't call blocking operations from the main thread Don't call task::wait from the main thread Be aware of special context rules for continuations of tasks that wrap async objects Be aware of special context rules for the create_async function Be aware of app container requirements for parallel programming Use explicit capture for lambda expressions Don't create circular references between ref classes and lambda expressions Don't use unnecessary synchronization Don't make concurrency too fine-grained Watch out for interactions between cancellation and exception handling Use parallel patterns Be aware of special testing requirements for asynchronous operations Use finite state machines to manage interleaved operations
- Working with tiles and the splash screen in Hilo (Windows Store apps using C++ and XAML) Why are tiles important? Choosing a tile strategy Designing the logo images Placing the logos on the default tiles Updating tiles Adding the splash screen
- Using the Model-View-ViewModel (MVVM) pattern in Hilo (Windows Store apps using C++ and XAML) What is MVVM? MVVM in Hilo Why use MVVM for Hilo? For more info Variations of the MVVM pattern Mapping views to UI elements other than pages Sharing view models among multiple views Executing commands in a view model Using a view model locator object to bind views to view models Tips for designing Windows Store apps using MVVM Keep view dependencies out of the view model Centralize data conversions in the view model or a conversion layer Expose operational modes in the view model Ensure that view models have the Bindable attribute Ensure that view models implement the INotifyProperyChanged interface for data binding to work Keep views and view models independent Use asynchronous programming techniques to keep the UI responsive Always observe threading rules for Windows Runtime objects
- Using the Repository pattern in Hilo (Windows Store apps using C++ and XAML) Introduction Code Walkthrough
- Creating and navigating between pages in Hilo (Windows Store apps using C++ and XAML) Understanding the tools Adding new pages to the project Creating pages in the designer view Establishing the data binding Creating the main hub page Navigating between pages Supporting portrait, snap, and fill layouts
- Using controls in Hilo (Windows Store apps using C++ and XAML) Data binding Data converters Common controls used in Hilo Image Grid and GridView ProgressRing Button TextBlock AppBar StackPanel ListView SemanticZoom Canvas and ContentControl Popup UI virtualization for working with large data sets Overriding built-in controls Touch and gestures Testing controls
- Using touch in Hilo (Windows Store apps using C++ and XAML) Press and hold to learn Tap for primary action Slide to pan Swipe to select, command, and move Pinch and stretch to zoom Turn to rotate Swipe from edge for app commands Swipe from edge for system commands What about non-touch devices?
- Handling suspend, resume, and activation in Hilo (Windows Store apps using C++ and XAML) Tips for implementing suspend/resume Understanding possible execution states Implementation approaches for suspend and resume in C++ and XAML Code walkthrough of suspend Code walkthrough of resume Other ways to exit the app
- Improving performance in Hilo (Windows Store apps using C++ and XAML) Improving performance with app profiling Profiling tips Other performance tools Performance tips Keep the launch times of your app fast Emphasize responsiveness in your apps by using asynchronous API calls on the UI thread Use thumbnails for quick rendering Prefetch thumbnails Trim resource dictionaries Optimize the element count Use independent animations Use parallel patterns for heavy computations Be aware of the overhead for type conversion Use techniques that minimize marshaling costs Keep your app's memory usage low when suspended Minimize the amount of resources your app uses by breaking down intensive processing into smaller operations
- Testing and deploying Hilo (Windows Store apps using C++ and XAML) Modes of testing Using the Visual Studio unit testing framework Using Visual Studio to test suspend/resume Using the simulator and remote debugger to test devices Using pseudo-localized versions for testing Security testing Using WinDbg for debugging Using the Visual C++ compiler for testing Making your app world ready Testing your app with the Windows App Certification Kit Creating a Windows Store certification checklist
- Meet the Hilo team (C++ and XAML) Meet the team
- Performing interop between XAML and DirectX Building and running the quickstart Solution structure Code walkthrough