From Wikipedia, the free encyclopedia
subsystem is a part of
.NET Framework 3.0
The Windows Presentation Foundation (or WPF),
formerly code named Avalon, is the graphical subsystem
feature of the
.NET Framework 3.0 (formerly called
and is directly related to
It is pre-installed in
the latest version of the
Microsoft Windows operating system. WPF is also available
for installation on Windows XP SP2 and Windows Server 2003. It
provides a consistent programming model for building
applications and provides a clear separation between the
UI and the
business logic. A WPF application can be deployed on the
desktop or hosted in a web browser. It also enables richer
control, design, and development of the visual aspects of
Windows programs. It aims to unify a host of application
services: user interface, 2D and 3D drawing, fixed and adaptive
animation, data binding,
WPF/E is a subset of WPF, and
stands for "Windows Presentation Foundation Everywhere". It is
basically a mobile version of WPF, based on
XPS, vector-based drawing and hardware acceleration are.
The following is a partial list of WPF features.
- All graphics (including desktop items like windows) will
be routed through
- This aims to provide a unified avenue for displaying
graphics, as well as more advanced graphical features.
- Routing the graphics through Direct3D will allow
Windows to offload graphics tasks to the
Graphics Processing Unit found on the computer's
graphics card. This will reduce the workload on the
Central processing unit.
- Supports vector-based graphics, which allow infinite
- Supports 3D model rendering and interaction in 2D
- WPF isn't just for building traditional standalone
applications. Its deployment model offers both standalone
and XAML Browser Applications (XBAP)
flavors. The programming model for building either flavor of
application is similar.
- Standalone applications are those that have been
locally installed on the computer using software such as
Microsoft Installer (MSI). Standalone applications
are considered full trust and have full access to
a computer's resources.
- XAML Browser Applications (XBAP's)
are programs that are hosted inside a
web browser such as
Internet Explorer. Hosted applications run in a
sandbox environment, and are not given full access
to the computer's resources and not all WPF
functionality is available. The hosted environment is
intended to protect the computer from malicious
applications. Starting an XBAP (pronounced "ex-bap")
from an HTML page or vice versa is seamless (there is no
security or installation prompt). Although one gets the
perception of the application running in the browser it
actually runs in an out of process exe different from
- WPF provides interoperability with
Win32: Via hosting, one can use Windows Presentation
Foundation inside existing Win32 code, or one can use
existing Win32 code inside Windows Presentation Foundation.
- Interoperability with
Windows Forms is also possible through the use of the
- WPF provides shape primitives for 2D graphics along with
a built-in set of brushes, pens, geometries, and transforms.
- The 3D capabilities in WPF are a subset of the full
featureset provided by Direct3D. However, WPF provides
tighter integration with other features like user interface
(UI), documents, and media. This makes it possible to have
3D UI, 3D documents, and 3D media.
- There is support for most common image formats.
- WPF supports the video formats
MPEG and some
- WPF supports time-based animations, in contrast to the
frame-based approach. This delinks the speed of the
animation from how the system is performing.
- Text rendering is supported using
ClearType. This provides for sub-pixel positioning,
natural advance widths, and Y-direction anti-aliasing. WPF
OpenType font features.
- WPF has a built-in set of data services to enable
application developers to bind and manipulate data within
applications. There exists support for three types of data
- one time: where the client ignores updates on the
- one way: where the client has read-only access to
- two way: where client can read from and write data
to the server
- Binding of data has no bearing on its presentation. WPF
provides data templates to control presentation of data.
- A set of built-in controls is provided as part of WPF,
containing items such as button, menu, and list box.
- A powerful concept in the WPF is the logical separation
of a control from its appearance.
- A control's template can be overridden to completely
change its visual appearance.
- A control can contain any other control or layout,
allowing for unprecedented control over composition.
Windows Imaging Component (WIC) for WPF will allow developers
to write image codecs for their specific image file formats as
well as custom bitmap effects and metadata.
- WPF provides for bitmap effects, however they are
rendered in software, not hardware-accelerated.
- Special effects such as dropshadows and blurring are
- Other effects such as reflections can be easily
WPF includes a number of text rendering features that were
not available in
GDI. This is the first Windows programming interface to
OpenType features to software developers, supporting both
OpenType, TrueType, and OpenType CFF (Compact Font Format)
Support for OpenType includes:
- Old-style numerals (for example, parts of the glyph hang
below the text baseline)
Other typography features provided by WPF include line-level
WPF text rendering takes advantage of advances in
ClearType technology, such as sub-pixel positioning,
y-direction anti-aliasing, hardware-accelerated text rendering,
as well as aggressive caching of pre-rendered text in video
The extent to which this is supported is dependent on the video
DirectX 10 cards will be able to cache the font glyphs in
video memory, then perform the composition (assembling of
character glyphs in the correct order, with the correct
spacing), alpha-blending (application of anti-aliasing), and RGB
blending (ClearType's sub-pixel color calculations), entirely in
hardware. This means that only the original glyphs need to be
stored in video memory once per font (Microsoft estimates that
this would require 2MB of video memory per font), and other
operations such as the display of anti-aliased text on top of
other graphics – including video – can also be done with no
computation effort on the part of the CPU. DirectX 9 cards are
only able to cache the alpha-blended glyphs in memory, thus
requiring the CPU to handle glyph composition and alpha-blending
before passing this to the video card. Caching these
partially-rendered glyphs requires significantly more memory
(Microsoft estimates 5MB per process). Cards that don't support
DirectX 9 have no hardware-accelerated text rendering
capabilities. ClearType font smoothing however cannot be
optionally turned off.
Animated text is also supported; this refers to animated
glyphs, as well as real-time changes in position, size, color,
and opacity of the text.
UI Automation to allow developers to create accessible
Extensible Application Markup Language
Following the success of
markup languages for web development, WPF introduces a new
language known as eXtensible Application Markup Language (XAML),
which is based on
It is meant to be a faster way to develop application user
interfaces and a better way for designers and developers to
XAML to develop user interfaces also allows for separation
of model and view; this is generally considered a good
architectural principle. In
XAML, every element maps onto a class in the underlying API,
and the attributes are set as properties on the instantiated
classes. As in web development, both layouts and specific themes
are well suited to markup, but
XAML is not required for either. Indeed, all elements of WPF
may be coded in a
.NET language (C#,
XAML code is ultimately compiled into a managed assembly in
the same way all .NET languages are, which means that the use of
XAML for development does not incur a performance cost.
It is likely that many applications, such as
Microsoft PowerPoint and
Word, will support exporting their content to WPF through a
There are several subset (or profiles) of
XAML, such as:
- XAML Presentation (XAML-P) - incorporates all items
encompassing WPF v1.0
XML Paper Specification (XPS) - a subset of XAML-P for
representing fixed format documents and used as the spool
format for the printing subsystem in Windows Vista
There are also profiles specific to Workflow Foundation, and
other domain specific subsets will likely emerge in the future.
There are a number of development tools available for
developing Windows Presentation Foundation applications, all
currently of beta quality.
Microsoft Cider is an add-in for the Visual Studio 2005
designer for building Windows Presentation Foundation
applications. Meant to be used by application developers.
Microsoft Expression Blend is a designer-oriented tool
that provides a canvas for the creation of WPF applications
with 2D and 3D graphics, text and forms content. It
XAML that may be exported into other tools.
Microsoft Expression Design is a bitmap and 2D-vector
graphics tool that allows export to
Electric Rain ZAM 3D provides an interactive graphical
design environment for constructing 3D models that can be
Mobiform Aurora provides an alternative tool for
constructing WPF user interfaces.
Windows Presentation Foundation/Everywhere
WPF/E control hosted in
Windows Presentation Foundation/Everywhere is a cross
platform XAML-based WPF technology
that provides features such as video, vector graphics, and
animations to multiple operating systems including
Windows XP, and
Mac OS X. Specifically, WPF/E is provided as an add-on for
Internet Explorer 6 and above, and
Apple Safari. WPF/E and WPF only share XAML presentation
These extensions will allow browsers to use WPF/E graphics
capabilities. The browser extensions will be similar to
Adobe Flash, a highly popular graphic plug-in available for
most browsers. Internet Explorer will have native support for
Windows Vista, and will support WPF/E in older versions.
WPF/E will work in concert with
XAML and will be scriptable with
Common Language Runtime so it can execute
C# code in a sandbox with no local file access.
Commonly mentioned as alternatives to WPF/E are
CTP of WPF/E was released in December 2006. Microsoft aims
to have a final release by mid-2007.
WPF is intended to be the next-generation graphics API for
Windows applications on the desktop. Applications written in WPF
are visually of a higher quality. The following are some of
Microsoft's own products or other third-party mainstream
applications written in WPF:
List of WPF applications
Microsoft Expression Design
Microsoft Expression Blend
New York Times Reader
MSDN .NET Framework: Windows Presentation Foundation
MSDN .NET Development: WPF : XAML Overview
Windows Vista: Windows Presentation Foundation (Avalon) FAQ
WPF and Win32 Interoperation Overview
MSDN Library : .NET Development : WPF : ClearType Overview
ASP.NET : WPF/E - December 2006 Community Technology Preview
.NET Framework 3.0
Windows Graphics Foundation
The Windows Presentation Foundation community portal --
The Windows Presentation Foundation section of the .NET
Framework 3.0 community site
MSDN Windows Presentation Foundation SDK -- Software
Development Kit for WPF
Getting Started (WPF) -- Roadmap to information for
developers new to WPF.
WPF SDK Blog -- Active blog maintained by the WPF SDK
Windows Presentation Foundation Unleashed -- The first
WPF book to market, written by the lead developers
Essential Windows Presentation Foundation -- An online
WPF tutorial and reference, written by
Microsoft Expression Blend -- Visual tool for creating
Windows Presentation Foundation applications
wpf made simple -- Provides info/samples on WPF
XAMLdev.com A selection of categorized resources on
A Guided Tour of Windows Presentation Foundation --
Microsoft's overview of Windows Presentation Foundation
Windows Presentation Foundation Security Sandbox -- An
overview of the partial trust sandbox in which WPF browser
MSDN Forums for Windows Presentation Foundation --
Active discussion forum for WPF developers
WPF/E Google Group -- Discussion group and list of
Microsoft goes cross-platform with WPF/Everywhere --
WPF/Everywhere explained in an interview with Microsoft's
Director of Developer Tools Product Management
WPF page on NetFXGuide.com
A Five Mile Overview of WPF -- A high-level overview of
WPF for software developers.
xbap.org -- Comprehensive information on XBAP
DirectX 10 Wiki - Wiki covering WPF and DirectX 10
Tutorials, Samples, Effect, News.
.NET Framework (Microsoft)
v • d • e
Windows Vista |
Wikipedia external links cleanup |
Windows multimedia |
Microsoft APIs |