GO-V.ORG
As seen in

Windows Presentation Foundation

Windows Presentation Foundation (WPF) is a free and open-source user interface framework for Windows-based desktop applications.[src] WPF applications are based in .NET, and are primarily developed using C# and XAML.[src] Originally developed by Microsoft, WPF was initially released as part of .NET Framework 3.0 in 2006.[src] In 2018, Microsoft released WPF as open source under the MIT License.[src] WPF's design and its layout language XAML have been adopted by multiple other UI frameworks, such as UWP, .NET MAUI, and Avalonia.[src]

Windows Presentation Foundation (WPF) is a free and open-source user interface framework for Windows-based desktop applications.[src] WPF applications are based in .NET, and are primarily developed using C# and XAML.[src] Originally developed by Microsoft, WPF was initially released as part of .NET Framework 3.0 in 2006.[src] In 2018, Microsoft released WPF as open source under the MIT License.[src] WPF's design and its layout language XAML have been adopted by multiple other UI frameworks, such as UWP, .NET MAUI, and Avalonia.[src] ==Overview== WPF employs XAML, an XML-based language, to define and link various interface elements, and uses C# to define program behavior.[src] WPF applications are deployed as standalone desktop programs.[src] WPF supports a number of common user interface elements, such as 2D/3D rendering, fixed and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media.[src] These elements can then be linked and manipulated based on various events, user interactions, and data bindings.[src] WPF was developed under the codename "Avalon", as part of the WinFX programming model for Windows "Longhorn".[src] In August 2004, Microsoft announced that components of WinFX would be backported to Windows XP and Windows Server 2003.[src] It would later be released as part of .NET Framework 3.0, a free download for these operating systems.[src] WPF runtime libraries are included with all versions of Microsoft Windows since Windows Vista and Windows Server 2008.[src] At the Microsoft Connect event on December 4, 2018, Microsoft announced releasing WPF as open source project on GitHub.[src] It is released under the MIT License.[src] Windows Presentation Foundation has become available for projects targeting the .NET software framework, however, the system is not cross-platform and is still available only on Windows.[src] MainWindow.xaml.cs: using System.Windows; namespace WpfExample { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void SubmitButton_Click(object sender, RoutedEventArgs e) { string name = this.NameInputTextBox.Text; this.ResultTextBlock.Text = $"Hello {name}!"; } } } In the above example, a UI element called MainWindow is declared as a subclass of the built-in Window class.[src] The XAML file defines the layout, which in this example is a vertical collection of controls - a textblock outlining instructions to the user, a textbox for the user to type their name, a button to submit, and a results text block.[src] When the button is clicked, the method SubmitButton_Click is called, which is defined in the .xaml.cs file.[src] This function updates the final textblock to contain a message greeting the user, addressing them by their submitted name.[src] ==Features== ===Media and graphics=== WPF supports most modern media types, including vector and raster images, audio, video, and can support both 2D and 3D rendering.[src] It also supports implementing graphical effects on visual elements, such as HLSL pixel shaders and built-in effects such as blurs and drop shadows.[src] WPF mainly relies on vector graphics, which allows most controls and elements to be scaled without loss in quality or pixelization.[src] ===Data binding=== WPF employs data binding, a technique of propagating changes between user interface elements and the object model of the program.[src] For instance, a textblock defined in XAML could bind its contents to a string property stored on a C# object in the following way: public class ExampleViewModel { public string Username { get; set; } } This would make the textblock display the value of the Username property.[src] The direction data binding happens is configurable - it can be defined to go UI-to-source (eg.[src] text entered into a textbox being propagated to a bound string property in code), or source-to-UI (eg.[src] a visual clock being updated to display the current time stored in code), or bi-directional.[src] Data binding doesn't have any restrictions on types, and it is possible to bind structs, classes, or collections.[src] Converters can be used to transpose the values and types being used during binding - for example, binding a textbox to a DateTime property, but using a converter to display the time as a formatted localised date string.[src] Most properties on built-in controls can be databound, and custom-made controls can create bindable properties by defining Dependency Properties.[src] MVVM, the architectural pattern encouraged by Microsoft for WPF developers, relies heavily on data binding.[src] ===Styles and templates=== Using templates and styles, developers can define the visuals and structure of UI elements.[src] A style is a combination of property settings that can be applied to a UI element with a single property attribute.[src] For example, a "blue radio button" style could be created and then be reused on any number of radio button controls throughout the program.[src] Styles can alter collections of properties of controls, but are not intended for significant structural changes.[src] Templates are a mechanism for defining alternative UI for portions of a WPF application.[src] There are several template types available in WPF for different scenarios, but they all have the general purpose of defining the contents, layout and structure of a UI element.[src] ===Animations=== In WPF, many visual properties can be animated.[src] This is exposed through dependency properties, which is the same underlying system that data binding relies on.[src] WPF animations are time-based, as opposed to frame-based.[src] Animation classes are based on the .NET type of property to be animated.[src] For instance, changing the color of an element is done with the ColorAnimation class and animating the width of an element (which is typed as a double) is done with the DoubleAnimation class.[src] Animations can be grouped into Storyboards, which are the primary way to start, stop, pause and otherwise manipulate animations.[src] ===Documents and text=== WPF natively supports paginated documents.[src] It provides the DocumentViewer class, which is for reading fixed layout documents.[src] The FlowDocumentReader class offers different view modes such as per-page or scrollable and also reflows text if the viewing area is resized.[src] It supports both the Open XML Paper Specification and Open Packaging Conventions.[src] WPF includes a number of text rendering features, including OpenType, TrueType, and OpenType CFF (Compact Font Format) fonts.[src] This means that WPF can support a wide number of text features, including ligatures, old-style numerals, swash variants, fraction, superscript and subscript, small caps, ruby characters, glyph substitution, multiple baselines, and kerning.[src] WPF handles texts in Unicode, and handles texts independent of global settings, such as system locale.[src] In addition, fallback mechanisms are provided to allow writing direction (horizontal versus vertical) handled independent of font name; building international fonts from composite fonts, using a group of single-language fonts; composite fonts embedding.[src] Font linking and font fallback information is stored in a portable XML file, using composite font technology.[src] The XML file has extension .[src] The WPF text engine also supports built-in spell checking.[src] It also supports such features as automatic line spacing, enhanced international text, language-guided line breaking, hyphenation, and justification, bitmap effects, transforms, and text effects such as shadows, blur, glow, rotation etc.[src] 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.[src] WPF text rendering takes advantage of advances in ClearType technology, such as sub-pixel positioning, natural advance widths, Y-direction anti-aliasing, hardware-accelerated text rendering, as well as aggressive caching of pre-rendered text in video memory.[src] ClearType cannot be turned off in older WPF 3.x applications.[src] ===Interoperability=== Windows Forms features are possible through the use of the ElementHost and WindowsFormsHost classes.[src] To enable the use of WinForms, the developer executes this from their WPF C# code: using System.Windows.Forms.Integration; WindowsFormsHost.EnableWindowsFormsInterop(); WPF programs, via the P/Invoke feature of the CLR, can access native functionality such calling functions from Windows libraries.[src] This allows the ability to communicate and operate other parts of the operating system, including unmanaged libraries.[src] ===Alternative input and accessibility=== WPF supports Windows Ink for pen-based input, and multi-touch input on Windows 7 and above.[src] It also supports Microsoft UI Automation to allow developers to create accessible interfaces, and to expose the UI to automated test frameworks.[src] ==XAML== Following the success of markup languages for web development, WPF introduced eXtensible Application Markup Language (XAML; ), which is based on XML.[src] XAML is designed as a more efficient method of developing application user interfaces.[src] XAML is a declarative language, meaning the developer (or designer) describes the behavior and integration of components without the use of procedural programming.[src] Although it is rare that an entire application will be built completely in XAML, the introduction of XAML allows application designers to more effectively contribute to the application development cycle.[src] Using XAML to develop user interfaces also allows for separation of model and view, which is considered a good architectural principle.[src] In XAML, elements and attributes map to classes and properties in the underlying APIs.[src] As in web development, both layouts and specific themes are well suited to markup, but XAML is not required for either.[src] Indeed, all elements of WPF may be coded in a .NET language (C#, VB.NET).[src] The XAML code can ultimately be compiled into a managed assembly in the same way all .NET languages are.[src] ==Deployment== WPF applications are Windows-only standalone desktop executables.[src] Historically, WPF supported compiling to XBAP, a file format intended to be shown in web browsers via a NPAPI plugin, but NPAPI and XBAP support was phased out of support by browsers, and XBAP compilation is now no longer included for WPF for .NET.[src] ==References== ==Bibliography== Adam Nathan: Windows Presentation Foundation Unleashed (WPF), December 21, 2006, Sams Publishing, Chris Anderson: Essential Windows Presentation Foundation (WPF), April 11, 2007, Addison-Wesley, Chris Sells, Ian Griffiths: Programming WPF, August 28, 2007, O'Reilly Media, Arlen Feldman, Maxx Daymon: WPF in Action with Visual Studio 2008, November 21, 2008, Manning Publications, ==External links== MSDN Library: Windows Presentation Foundation Rich typography with Windows Presentation Foundation Windows Presentation Foundation User Education[src]

81 sentences · 81 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Windows Presentation Foundation." encyclopegia.org, 2026, https://encyclopegia.org/wiki/windows-presentation-foundation. Accessed 05 December 2026.

Chicago

"Windows Presentation Foundation." encyclopegia.org. Accessed December 5, 2026. https://encyclopegia.org/wiki/windows-presentation-foundation.

APA

encyclopegia.org. (2026). Windows Presentation Foundation. Retrieved December 5, 2026, from https://encyclopegia.org/wiki/windows-presentation-foundation

Accessed December 5, 2026 · CC BY-SA 4.0 · citation page · JSON

Claims

PredicateValueSource
release date2006Wikipedia

Related articles

Windows Messenger service

stub · references available

Presentation of Jesus at the Temple

stub · references available

Gottfried Keller Foundation

stub · references available

Windows Communication Foundation

stub · references available

features new to Windows Vista

stub · references available

Giordano Bruno Foundation

stub · references available

Friedrich Naumann Foundation

stub · references available

Adam Müller-Guttenbrunn foundation

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1369832009 · 0.5 · snapshot enwiki-001369832009

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.