Pages

Monday 14 May 2012

WPF (Windows Presentation Foundation): Features

Microsoft introduced WPF (Windows Presentation Foundation) API in .NET 3.0 framework (previously known as WinFX). WPF merged all the unrelated APIs into a single unified object model. WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia into one single framework. It provides a consistent programming model for building applications and provides a clear separation between the user interface and the business logic. So if you want to use 3D graphics or multimedia for your application, you do not use to need use different APIs. WPF provides all the functionalities you need to develop richer GUI applications.

Features of WPF:

1. Separation of Appearance and Behavior: WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the Extensible Application Markup Language (XAML), the behavior is implemented in a managed programming language like C# or Visual Basic. XAML, the Extensible Application Markup Language is used to create custom controls, graphics, 3D images and animations that are not available in traditional HTML implementations.

2. Rich composition: Controls in WPF are extremely composable. You can define almost any type of controls as content of another. Although these flexibility sounds horrible to designers, its a very powerful feature if you use it appropriate. Put an image into a button to create an image button, or put a list of videos into a combobox to choose a video file.

3. Highly customizable: Because of the strict separation of appearance and behavior you can easily change the look of a control. The concept of styles let you skin controls almost like CSS in HTML. Templates let you replace the entire appearance of a control.

4. Resolution independence: All measures in WPF are logical units - not pixels. A logical unit is a 1/96 of an inch. If you increase the resolution of your screen, the user interface stays the same size - it just gets crispier. Since WPF builds on a vector based rendering engine it's incredibly easy to build scaleable user interfaces.

5. Data binding: WPF has a built-in set of data services to enable application developers to bind and manipulate data within applications.

6. Direct3D: Graphics, including desktop items like windows, are rendered using Direct3D. This allows the display of more complex graphics and custom themes, at the cost of GDI's wider range of support and uniform control theming. It allows Windows to offload some graphics tasks to the GPU.

7. Media services: The WCF provides an integrated system for building user interfaces with common media elements like vector and raster images, audio, and video. WPF also provides an animation system and a 2D/3D rendering system.

8. Templates: In WPF you can define the look of an element directly, via its properties, or indirectly with a Template or Style.

9. Animations: WPF supports time-based animations, in contrast to the frame-based approach. This decouples the speed of the animation from how the system is performing.

10. Imaging: WPF can natively access Windows Imaging Component (WIC) code and APIs allowing developers to write image codecs for their specific image file formats.

11. Documents: WPF natively supports paginated documents. It provides the DocumentViewer class, which is for reading fixed layout documents.

12. Text: WPF includes a number of typographic and text rendering features that were not available in GDI.

No comments:

Post a Comment

About the Author

I have more than 10 years of experience in IT industry. Linkedin Profile

I am currently messing up with neural networks in deep learning. I am learning Python, TensorFlow and Keras.

Author: I am an author of a book on deep learning.

Quiz: I run an online quiz on machine learning and deep learning.