Top Features Of Windows Presentation Foundation (WPF)

In this article you will learn about the top features of Windows Presentation Foundation (WPF).

WPF stands for Windows Presentation Foundation, introduced with .NET 3.0 framework by Microsoft. Windows presentation foundation provides us rich user interface and graphics which is not available with windows application. To use this you can create a desktop application more attractive with more functionality.

WPF basically uses the declarative language XAML (Extensible Application Markup Language). WPF application is a combination of XAML and .NET language like C#/VB.Net, etc.

wpf

TOP Features of WPF

  1. Resolution Independence

    WPF Application is resolution independent. I mean to say when you create a application in WPF then this application is independent of screen resolution. It auto uses the
    DirectX components. Resolution of WPF is always same with any type of screen resolution.

  2. Separation of Concerns

    In WPF application, there is two part appearance of UI and its behavior. Appearance means to say application User Interface and appearance is specified by XAML. Behavior means to say how the application work and it is handled by .NET language like C#/VB.Net, etc.

    Hence you can very easily customize the look of controls and its functionality. XAML is same as like in web application CSS in HTML.

  3. Add Control inside a Control

    WPF introduced a very nice feature, now you can add a control inside another control. Like if you want to add a textbox inside a button then very easily you can do this. This is not possible in WindowS application.

Different types of Layout

Layout is used to separate the control on the User Interface. It provides us a way, in which we can create our application neater and clean with lots of controls.

  1. Grid: Grid as name suggested is same as table. It has rows and columns. You can place your control inside grid cell. It is same as in web application GridView.

  2. Dock Panel: I hope you are aware of Docking in windows application. Using docking you can place your control either to top, right, left or bottom. So, Dock panel provide this type of functionality in WPF.

  3. Stack Panel: Inside Stack Panel a control manage either horizontally or vertically. You cannot set control on any other scale.

  4. Canvas: It provides us a layout where we can place our controls anywherewe want. You have total control on layout.

3D & 2D Graphics and Animation

WPF comes with entire rich component all in one. In WPF, you can use controls as 3D layout or 2D layout. In this, you can also use animation, media file and graphics. It supports playing video or audio file is supported by Media player.

Thanks for reading this article, hope you enjoyed it.