Chapter 34
Windows Presentation Foundation
Windows Presentation Foundation (WPF) is one of the major extensions of .NET Framework 3.0. WPF is a new library to create the UI for smart client applications. While the Windows Forms controls are native Windows controls that use Window handles that are based on screen pixels, WPF is based on DirectX. The application does not use Window handles. It is easy to resize the UI, and it supports sound and video.
The main topics of this chapter are, as follows:
- An overview of WPF
- Shapes as the base drawing elements
- Scaling, rotating, and skewing with transformations
- Different kind of brushes to fill elements
- WPF controls and their features
- How to define a layout with WPF panels
- The WPF event-handling mechanism
- Styles, templates, and resources
Overview
One of the big features of WPF is that work can be easily separated between designers and developers. The outcome from the designer’s work can directly be used by the developer. To make this possible, you need to understand XAML. The first topic of this chapter gives you an overview of WPF, including enough information to understand the principles of XAML. It also covers information on how designers and developers can cooperate. WPF consists of several assemblies containing thousands of classes. So that you can navigate within this vast number of classes and find what you need, the overview explains the class hierarchy and namespaces in WPF.
XAML
XML for Applications Markup Language (XAML) is ...