2006-05-21
| Table of Contents: |
| Rate This Article: | Add This Article To: |
( Page 2 of 4 )
One of the hottest topics among developers is Windows Presentation Foundation (WPF), a new graphics subsystem that promises to simplify the task of the developer while bringing significantly enhanced visual experiences to the end user. Formerly code-named Avalon, WPF is one part of what is now called WinFX, the set of "next generation" (Microsoft's words, not mine) managed APIs for application development.
This is the first in a series of two articles on WPF. Today, we look at the goals of WPF and learn about Extensible Application Markup Language, or XAML, the declarative markup vocabulary that is part of WPF. The second article will delve into WPF programming with Visual Studio.
Before getting into the details of WPF let's take a quick look at WinFX.
WinFX
In addition to WPF, the components of WinFX are Windows Communication Foundation (WCF) for building service-oriented apps, Windows Workflow Foundation (WWF) for capturing business process flow and translating it into code, and InfoCard for providing security identities.
It's important to understand that WinFX and its components are not a replacement for the .Net framework or for the Common Language Runtime. Rather, you should think of WinFX as a meta-framework that sits on top of the .Net framework, as shown in Figure 1. In technical terms, WinFX is nothing more than another set of namespaces and classes for use in developing .Net applications.
Figure 1. Where WinFX fits into the application development picture.
WinFX will be released with Windows Vista at some time in the not-too-distant future, probably early 2007. This will also probably coincide with the release of .Net 3.0.
WinFX is not Vista-specific, however, and it is designed to be used with either version 2 or version 3 of .Net and also to create apps for Windows XP as well as Vista.
WPF Goals
WPF was designed with three primary goals in mind. The first was a composable user interface, meaning the ability to be either code-based, like Windows forms or Microsoft Foundation Classes, or markup-based, like HTML pages. Markup-based UI development offers several advantages, such as separating UI design from coding. Microsoft will provide for WPF a design tool named Sparkle — Microsoft Expression Designer — that allows graphic designers to create the UI independent of the project code. It will be possible to integrate the output of Sparkle back into the development process at any time. It is also planned to include in Visual Studio 2007 a dedicated WPF design tool.
The second goal was to provide a higher level of user interface experience for the end user. By taking advantage of the fast graphics chips present on most computersystems, WPF will permit designers to create fast and sophisticated UIs that incorporate animation and 3-D effects.
The final goal was easy control and document layout and rendering. WinFX combines the ability to use sophisticated UI controls, such as grids and tables, with the easy of rendering and text flow that is characteristic of web pages.
An important aspect of WPF is that it uses a vector-based rendering engine, which is fundamentally different from the raster-based engines used previously. A raster-based engine defines display elements in terms of pixels. As screen and printer resolution increase, it has become problematic to render so many pixels in an efficient manner while maintaining high quality output across all resolutions. In contrast, vector-based rendering defines display elements using a scalable coordinate system so that they are independent of the output device resolution. Of course, some items, such as photographs, will remain raster-based, but the use of vector rendering for fonts and other standard display elements provides significant advantages.
![]() |
|


