This course covers Windows Presentation Foundation (WPF) and is intended for developers familiar with C# and .NET and with Windows UI development. It covers all versions - from WPF 3.0 to WPF 4.0 and teaches developers how to properly use WPF to build advanced Windows client desktop applications.
The module list covered includes:
Day 1
Introduction
Windows Presentation Foundation is the new API for building user experiences on .NET. This module looks at the motivation behind WPF and its main features. We'll look at the primary tools and classes used to generate WPF applications and how a basic application fits together.
Using XAML
In this module, we'll discuss how XAML allows for creation of UI independent of the procedural code and how WPF provides for a clean separation of code and UI.
Managing Layout
WPF provides a powerful layout engine. In this module, you'll learn how to choose between the different built-in panels and how to create your own panel if the need arises. You'll also discover how to fine-tune the layout using margin, padding and alignments, and to provide special effects through transforms such as rotations and scaling.
Day 2
Framework Architecture
In this module we will cover internal details of the framework classes - how WPF integrates with the Windows operating system, manages property values and how it ultimately renders visual elements onto the screen.
Input Management
WPF includes a new input management architecture that allows elements to receive input from child controls more easily than previous technologies. In this module, we will examine the new input architecture and see the most effective ways to take advantage of it. You'll also learn about commands and how to consolidate event handlers for different types of controls.
Designers + Developers: creating consistent UI with resources
WPF enables much tighter integration between developers and designers and in this module we will discuss a variety of techniques to make this process run more smoothly. We will also look at ways to structure our project by separating out designer assets using Expression Blend and creating a logical project structure making it easier to have different roles working on the application together without interference.
Designers + Developers: organizing your application using styles
In this module we will continue the discussion of integrating designers into the development workflow by examining the support for common property setters through WPF Styles. You will learn how to segregate common properties and store them into resources so they can be managed in a single location. We will also discuss how visual interactivity can be achieved using Triggers - a fundamental support feature we will use later in the course.
Day 3
Data Binding: Basics
One of the most interesting features of WPF is its ability to present data quickly and effectively. This module explains how to connect basic data to the UI and the motivation and technology behind it. You will learn how to connect controls together, how to make your business objects "binding-aware" and how to provide type conversions for your binding expressions.
Data Binding: Collections and Hierarchies
In this module, you will continue the data binding exploration by examining how to provide visual information for your business objects through data templates and then how to manage collections of objects on the UI. Finally, you will learn how to customize the display of collections through sorting, filtering and grouping, and how to data bind to hierarchies of collections (parent/child).
Model-View-ViewModel
In this module we will discuss the Model-View-ViewModel UI pattern which is useful in separating the UI and visualization from the procedural logic that drives it. We will look at how you can use this to structure your application to provide better testability as well as which roles will provide which features (model vs. view vs. viewmodel).
Day 4
Graphics
In this module, you'll learn how to utilize the graphics support in WPF. First, you'll get an overview of the graphics capabilities of WPF: shapes and geometries. Then, you'll learn how to use Expression Blend to create custom shapes, fills and special effects such as opacity and reflections.
Control Templates: basics
A unique capability of WPF is the ability to override the drawing behavior of all of the built-in controls. In this module, you'll learn how to redefine the visual appearance of existing controls through Control Templates. Here we will look at doing a simple replacement - the Button and how to provide a new visualization as well as visual behavior using Triggers and the Visual State Manager (VSM).
Control Templates: beyond buttons
In this module we will continue our examination of control templates by looking at more advanced and complicated controls such as ListBox, Sliders, Treeviews and Tab controls. You will learn the best practices to replacing the various supported templates to provide a completely new visualization while still maintaining the complete procedural behavior.
Day 5
Custom Controls
This module covers building reusable controls through composition and inheritance and then looks at building a new control from scratch. You'll learn about providing default styles for your controls and integrating with the WPF theme system so your control changes its visual appearance when the operating system theme changes.
Integrating WPF with Windows Forms
WPF provides extensive support to exist side-by-side with legacy technologies and in this module we'll look at the various ways you might use WPF within existing Windows Forms applications. We will also look at the opposite - how to use legacy controls such as
Windows Forms controls from within WPF applications.
Appendices
Controls Reference
This module details most of the supplied controls in WPF. It shows how to create and use them from XAML as well as providing information on controls that are new. [Note this is intended to be a reference for students, not to be delivered in lecture form].
Integrating WPF with Win32
This module is a companion to the above Windows Forms interop and completes the story by detailing how to interoperate with traditional C/C++ Win32 code such as MFC and WTL using C++/CLI.
Deployment Options
In this module, you will explore deployment options for your WPF applications and be introduced to the XAML Browser application style of deployment. As part of that, you will learn how to work within the .NET security infrastructure to provide a rich client deployed over the Internet.
Managing Binary Resources
Applications commonly use images and other media to provide visual feedback to the user. In this module you will see how WPF manages binary resources--either by embedding the content into an assembly, or standalone sources intended to be consumed by the application.
Internationalizing your application
This module will examine the support in WPF for globalization. We will examine some of the pitfalls present today and how to use some free tools to make it easer to develop applications intended for non-US markets.
Navigation Services
This module covers the new navigation services of WPF and how to use them to build task-oriented applications or wizard-style pages. It also includes coverage of annotations and the history journal.
Documents, XPS + Printing
Adding rich document support to your applications is easy with WPF because it supports a full API for managing textually oriented content. This module explores this section of the WPF API and shows how to use the document support and then how to render it to a fixed format using the XML Paper Specification (XPS) support provided in the framework.
User Input Validation
This module examines the validation infrastructure and demonstrates how you can provide visual feedback to the user when the input is improperly formed. Several alternatives are discussed which build on the various features of the platform.