- Great Painters
- Accounting
- Fundamentals of Law
- Marketing
- Shorthand
- Concept Cars
- Videogames
- The World of Sports

- Blogs
- Free Software
- Google
- My Computer

- PHP Language and Applications
- Wikipedia
- Windows Vista

- Education
- Masterpieces of English Literature
- American English

- English Dictionaries
- The English Language

- Medical Emergencies
- The Theory of Memory
- The Beatles
- Dances
- Microphones
- Musical Notation
- Music Instruments
- Batteries
- Nanotechnology
- Cosmetics
- Diets
- Vegetarianism and Veganism
- Christmas Traditions
- Animals

- Fruits And Vegetables


  1. Architecture of Windows NT
  2. AutoPlay
  3. Bill Gates
  4. BitLocker Drive Encryption
  5. Calibri
  6. Cambria
  7. Candara
  8. Chess Titans
  9. ClearType
  10. Consolas
  11. Constantia
  12. Control Panel
  13. Corbel
  14. Criticism of Windows Vista
  15. Dashboard
  16. Desktop Window Manager
  17. Development of Windows Vista
  18. Digital locker
  19. Digital rights management
  20. Extensible Application Markup Language
  21. Features new to Windows Vista
  22. Graphical user interface
  23. Group Shot
  24. ImageX
  25. INI file
  26. Internet Explorer
  27. Internet Information Services
  28. Kernel Transaction Manager
  29. List of Microsoft software codenames
  30. List of Microsoft Windows components
  31. List of WPF applications
  32. Luna
  33. Mahjong Titans
  34. Meiryo
  35. Microsoft Assistance Markup Language
  36. Microsoft Expression Blend
  37. Microsoft Expression Design
  38. Microsoft Gadgets
  39. Microsoft Software Assurance
  40. Microsoft Virtual PC
  41. Microsoft Visual Studio
  42. Microsoft Windows
  43. Microsoft Windows Services for UNIX
  44. MS-DOS
  45. MSN
  46. MUI
  47. Object manager
  48. Operating system
  49. Original Equipment Manufacturer
  50. Outlook Express
  51. Peer Name Resolution Protocol
  52. Protected Video Path
  53. Purble Place
  54. ReadyBoost
  55. Recovery Console
  56. Remote Desktop Protocol
  57. Security and safety features of Windows Vista
  58. Segoe UI
  59. User Account Control
  60. WIM image format
  61. Windows Aero
  62. Windows Anytime Upgrade
  63. Windows Calendar
  64. Windows CE
  65. Windows Communication Foundation
  66. Windows Disk Defragmenter
  67. Windows DreamScene
  68. Windows DVD Maker
  69. Windows Explorer
  70. Windows Fax and Scan
  71. Windows Forms
  72. Windows Fundamentals for Legacy PCs
  73. Windows Hardware Engineering Conference
  74. Windows Live
  75. Windows Live Gallery
  76. Windows Live Mail Desktop
  77. Windows Mail
  78. Windows Media Center
  79. Windows Media Player
  80. Windows Meeting Space
  81. Windows Mobile
  82. Windows Movie Maker
  83. Windows Photo Gallery
  84. Windows Presentation Foundation
  85. Windows Registry
  86. Windows Rights Management Services
  87. Windows Security Center
  88. Windows Server Longhorn
  89. Windows Server System
  90. Windows SharePoint Services
  91. Windows Shell
  92. Windows Sidebar
  93. Windows SideShow
  94. Windows System Assessment Tool
  95. Windows System Recovery
  96. Windows Update
  97. Windows Vienna
  98. Windows Vista
  99. Windows Vista editions and pricing
  100. Windows Vista Startup Process
  101. Windows Workflow Foundation
  102. Windows XP
  103. Windows XP Media Center Edition
  104. XML Paper Specification
  105. Yahoo Widget Engine

This article is from:

All text is available under the terms of the GNU Free Documentation License: 

Windows Presentation Foundation

From Wikipedia, the free encyclopedia

This subsystem is a part of .NET Framework 3.0
This 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 WinFX)[1] and is directly related to XAML.[2] It is pre-installed in Vista,[3] 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 documents, vector graphics, raster graphics, animation, data binding, audio and video.

WPF/E is a subset of WPF, and stands for "Windows Presentation Foundation Everywhere". It is basically a mobile version of WPF, based on XAML and Javascript. 3D features are not included, but XPS, vector-based drawing and hardware acceleration are.


The following is a partial list of WPF features.

Graphical Services

  • All graphics (including desktop items like windows) will be routed through Direct3D.
    • 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 computer's Central processing unit.
    • Supports vector-based graphics, which allow infinite lossless scaling.
    • Supports 3D model rendering and interaction in 2D Applications.


  • 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 ClickOnce or 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 partial trust 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 the browser.


  • 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.[4]
  • Interoperability with Windows Forms is also possible through the use of the ElementHost and WindowsFormsHost classes.

Media Services

  • 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 WMV, MPEG and some AVI files.
  • 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 also supports OpenType font features.

Data Binding

  • 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 binding:
    • one time: where the client ignores updates on the server
    • one way: where the client has read-only access to data
    • 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.

User Interface

  • 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 built in.
  • Other effects such as reflections can be easily implemented.


WPF includes a number of text rendering features that were not available in GDI. This is the first Windows programming interface to expose OpenType features to software developers, supporting both OpenType, TrueType, and OpenType CFF (Compact Font Format) fonts.

Support for OpenType includes:

  • Ligatures
  • Old-style numerals (for example, parts of the glyph hang below the text baseline)
  • Swash variants
  • Fractions
  • Superscript and Subscript
  • Small caps

Other typography features provided by WPF include line-level justification and Ruby characters.

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 memory.[5] The extent to which this is supported is dependent on the video card. 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.



WPF supports UI Automation to allow developers to create accessible interfaces.


Main article: 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 XML. It is meant to be a faster way to develop application user interfaces and a better way for designers and developers to collaborate. Using 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#, The 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 XAML representation.

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 generates XAML that may be exported into other tools.
  • Microsoft Expression Design is a bitmap and 2D-vector graphics tool that allows export to XAML.
  • Electric Rain ZAM 3D provides an interactive graphical design environment for constructing 3D models that can be exported into XAML.
  • Mobiform Aurora provides an alternative tool for constructing WPF user interfaces.


Main article: Windows Presentation Foundation/Everywhere
WPF/E control hosted in Internet Explorer
WPF/E control hosted in Internet Explorer

Windows Presentation Foundation/Everywhere is a cross platform XAML-based WPF technology[6] that provides features such as video, vector graphics, and animations to multiple operating systems including Windows Vista, Windows XP, and Mac OS X. Specifically, WPF/E is provided as an add-on for Mozilla Firefox, Internet Explorer 6 and above, and Apple Safari. WPF/E and WPF only share XAML presentation layer.

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 WPF in Windows Vista, and will support WPF/E in older versions.

WPF/E will work in concert with XAML and will be scriptable with JavaScript. Version 2.0 will also contain a version of the Common Language Runtime so it can execute VB.Net and C# code in a sandbox with no local file access.

Commonly mentioned as alternatives to WPF/E are Adobe Flex, Nexaweb, OpenLaszlo, and Ajax.

The first CTP of WPF/E was released in December 2006. Microsoft aims to have a final release by mid-2007.

WPF Applications

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:

Main article: List of WPF applications
  • Microsoft Expression Design
  • Microsoft Expression Blend
  • Yahoo! Messenger
  • New York Times Reader


  1. ^ MSDN .NET Framework: Windows Presentation Foundation
  2. ^ MSDN .NET Development: WPF : XAML Overview
  3. ^ Windows Vista: Windows Presentation Foundation (Avalon) FAQ
  4. ^ WPF and Win32 Interoperation Overview
  5. ^ MSDN Library : .NET Development : WPF : ClearType Overview
  6. ^ ASP.NET : WPF/E - December 2006 Community Technology Preview

See also

  • .NET Framework 3.0
  • Computer graphics
  • DirectX
  • Windows Graphics Foundation
  • Windows Forms

External links

  • 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 team.
  • Windows Presentation Foundation Unleashed -- The first WPF book to market, written by the lead developers Adam Nathan
  • Essential Windows Presentation Foundation -- An online WPF tutorial and reference, written by Chris Anderson
  • Microsoft Expression Blend -- Visual tool for creating Windows Presentation Foundation applications
  • wpf made simple -- Provides info/samples on WPF
  • A selection of categorized resources on XAML.
  • 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 applications run
  • MSDN Forums for Windows Presentation Foundation -- Active discussion forum for WPF developers
  • WPF/E Google Group -- Discussion group and list of examples
  • Microsoft goes cross-platform with WPF/Everywhere -- WPF/Everywhere explained in an interview with Microsoft's Director of Developer Tools Product Management
  • WPF/E
  • WPF page on
  • A Five Mile Overview of WPF -- A high-level overview of WPF for software developers.
  • -- Comprehensive information on XBAP applications
  • DirectX 10 Wiki - Wiki covering WPF and DirectX 10 Tutorials, Samples, Effect, News.
Retrieved from ""