Windows Presentation Foundation
- Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences.
- With WPF, we can create a wide range of both standalone and browser-hosted applications.
- The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware.
- WPF extends the core with a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2-D and 3-D graphics, animation, styles, templates, documents, media, text, and typography.
- WPF is included in the Microsoft .NET Framework, so we can build applications that incorporate other elements of the .NET Framework class library.
Features of WPF
- WPF is resolution independence since all measures in WPF are logical units, not pixels. A logical unit is a 1/96 of an inch. So, with changing the screen resolution setting in WPF each control will look same for each resolution. It is not based on Dots per inch (DPI) setting of the device.
Separation of appearance and behaviors
- WPF separates the appearance of a UI from its behavior. The appearance is specified by XAML and behavior is specified by a managed programming language like C# or VB.
Built-In support for graphics and animation
- WPF applications run within DirectX environment, hence it has major support of graphics and animation capabilities. WPF has a separate set of classes that are specifically dealing with animation effects and graphics.
Supports for Audio and Video
- WPF has support for playing any audio or video file supported by Windows Media Player. It also gives you the tools to integrate video content into your rich UI such as placing a video window on a spinning 3-D cube.
- WPF supports separation of appearance and behaviors; hence we can easily change the look of a control or a set of controls. This concept of styling controls in WPF is almost like CSS in HTML. In WPF, we store styles, controls, animations, and even an object as a resource and we may associate that resource to the controls. Each resource is declared once when the form loads itself.