With the introduction of .Net framework 3.0, the Windows based applications family gets new member called as Windows Presentation Foundation (WPF). WPF was previously known as “Avalon”.
The earlier .Net Framework versions were relied on older GDI/GDI+ subsystems. The Graphics Device Interface (GDI/GDI+) is a Microsoft’s Windows Application Programming interface and core operating system component that is responsible for representing graphical objects and transmitting them to output devices such as Monitor and Printer. GDI/GDI+ is responsible for task that involved drawing lines and curves, rendering fonts, palettes, bitmaps, etc. But the GDI/GDI+ is not suitable for high performance multimedia such as Games, animations and rich visual effects. The WPF is based on Direct3D which provides a visually stunning user interfaces.
|Microsoft .Net - Windows Presentation Foundation|
GDI was first introduced in 1985 with the first Microsoft version release. The idea behind the GDI is to create an abstraction of physical device, so the calling application doesn’t have to adjust its code for specific device. In other words, the same code that using GDI will be able to draw graphics on any GDI compatible device and it will look same each time. But the GDI has some drawbacks that it does not exposed to the advanced abilities of modern devices such as animation and rich visual effects, transforms, light sources, physics and more. This limitation is called as Inability to Rasterize 3D and this limitation makes GDI not suitable well for animations and rich visual effects.
To overcome this limitation, Microsoft brought GDI+, the successor of GDI in 2001 with release of Windows XP. GDI was expanded to GDI+ and it has some advanced features such as 2D vector graphics, Imaging capability, 2D anti-aliasing, Floating point coordinates and Alpha blend for colors.
But still rendering the vector based graphics demands a lot of CPU usage because it is not hardware accelerated. Though GDI+ provides better rendering quality and clean code, it makes it slower than GDI. GDI/GDI+ is good in drawing windows and buttons but very CPU consuming and not hardware accelerated due to which windows leading to misbehaving software and frozen and unresponsive program operation. GDI/GDI+ is not suitable for high performance multimedia such as games.
Microsoft then came with DirectX – a set of interfaces for direct access to video cards, sound devices and mouse to perform more optimized vector calculations, visual effects and more. The most important interfaces are Direct3D for rendering 3D graphics and DirectDraw (Direct2D) for rendering 2D graphics. Everything in Direct3D is hardware accelerated, many complex calculations performed by the CPU itself, to reduce the load on CPU. Direct3D makes a resolution independent and vector based applications to take advantages of modern graphics hardware.
- WPF is essentially a new API for creating a Graphical User Interfaces for the Windows Platform.
- WPF is more than just a next-generation presentation system for building Windows Client application along with visually stunning user interfaces.
- WPF is builds on top of the DirectX (Direct3D), instead of relying on the older GDI/GDI+ subsystem.
- WPF is a vector graphics based UI presentation layer and being vector based it allows the presentation layer to smoothly scale UI elements to any size without distortion.
- WPF is “skin-able” and “theme-able”. It means WPF allows changing the look and feel of any UI control.
- The core of WPF is a resolution independent and the vector based rendering engine takes the advantages of modern graphics hardware.
- The core of WPF is extended with a comprehensive set of application development features that includes Extensible Application Markup Language (XAML), controls, data binding, layout, 3D graphics, animations along with rich visual effects, templates, media, text etc.
- The most important feature of the WPF is – extended DataBinding. With WPF, you can perform data manipulation using .Net Framework Code, XAML or a combination of both. You can bind to controls, public properties, XML or objects, making data binding quick, flexible and easier than ever.
- WPF provides a consistent programming model for building applications and a clean separation between the user interfaces and the business logic. You may now separate the function of a control from its appearance.
- With WPF, you can build up complex UI elements from simpler one. Now you can build a new control which may have controls inside a control.
- With WPF, you can create a wide range of both stand-alone and browser-hosted applications.
Please leave your valuable comments…. If you think article is worth to share then please share the article on your favourite social media with the help of below Sharing is Caring widget.