Windows Presentation Foundation

Windows Presentation Foundation (WPF) is a free and open-source user interface framework for Windows-based desktop applications.

[3] WPF's design and its layout language XAML have been adopted by multiple other UI frameworks, such as UWP, .NET MAUI, and Avalonia.

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.

program could be created like so: MainWindow.xaml: MainWindow.xaml.cs: In the above example, a UI element called MainWindow is declared as a subclass of the built-in Window class.

[10][11] WPF mainly relies on vector graphics, which allows most controls and elements to be scaled without loss in quality or pixelization.

[12][13] WPF employs data binding, a technique of propagating changes between user interface elements and the object model of the program.

[14][15] MVVM, the architectural pattern encouraged by Microsoft for WPF developers, relies heavily on data binding.

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.

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.

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.

[29] XAML is a declarative language, meaning the developer (or designer) describes the behavior and integration of components without the use of procedural programming.

Using XAML to develop user interfaces also allows for separation of model and view, which is considered a good architectural principle.

Silverlight had a WPF-based implementation, including using XAML for layouting, that supported video, vector graphics, and animations.

[34] Using add-ons, it was supported on Mozilla Firefox, Internet Explorer 6 and above, Google Chrome 42 and below and Apple Safari.

[36] After becoming open source in 2018, WPF inspired the development of Avalonia, an open-source .NET cross-platform XAML-based UI framework, distributed under the MIT License.

[37] While WPF only is intended for Windows, Avalonia also supports builds for web (via WebAssembly), MacOS, Android, iOS, and Linux.

[44] Visual Studio is not strictly required develop WPF projects, as solutions can be built in the command line using MSBuild.

[45] Microsoft Blend is a designer-oriented tool that provides an artboard 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 and shares solution (sln files) and project formats (csproj, vbproj) with Microsoft Visual Studio.

Screenshot of developing a basic Windows Presentation Foundation (WPF) UI application in Visual Studio 2022. XAML is used to define the layout, while C# is used to define the interactive behavior.
Visual Studio is an example of an application made using WPF
An example of an app made with UWP, a XAML-based framework influenced by WPF