WPF (Windows Presentation Foundation) is a UI (User Interface) Framework in which desktop client applications are created. It contains a wide range of application development features, starting with its model and then resources, controls, graphics, schedules, Data Binding, etc.
WPF is part of .NET, so the functionality is defined through C # code, while the look (design) of the application defines XAML (eXtensible Application Markup Language) code.
Benefits of using WPF are:
- Superior Databinding – data binding in a sence whenever you have a data source and you want data to be displayed over a window,
One way data binding – data will flow from the source to the control,
Two way data binding – if you are making any changes in controls that will also be reflected in the actual data source
- Support for MVVM (Model View ViewModel) – advanced stage of the 3-tier architecture (UI, business logic and data access layer) which is used for any data communication
- Animations through storyboarding – you don’t have to write any programming logic or performing any animation or any 3D things, but you can do all those things just by putting some proper tags using extensible application markup language.
- 3D Support
- Better performance
- Cleaner usage of controls – in WPF whenever we put any control in XAML, you can put the customization in those particular tags through XAML code itself.
For example, if you want to put an image button, and you don’t have an image button, you can simply put a button tag and inside that you can an image tag, so it will create the image button for you. Similarly, you can put some more cleaning usage of the controls while working in a WPF application.
WPF has a lots of UI controls. These controls support actions such as drag and drop, setting properties and events, data binding, and setting up resources and templates. Some of those controls are given bellow:
WPF DatePicker Control – Is used to create a visual DatePicker that let user to pick a date and fire an event on the selection of the date.
WPF DockPanel – Is used to dock child elements in the left, right, top, and bottom positions of the relative elements. The position of child elements is determined by the Dock property of the respective child elements and the relative order of those child elements.
WPF ComboBox – Is an items control that works as a ListBox control but only one item from the collection is visible at a time and clicking on the ComboBox makes the collection visible and allows users to pick an item from the collection.
WPF MessageBox – Represents a message box dialog. The Show static method of the MessageBox is the only method that is used to display a message box.