What is WPF?

WPF is a framework for building Windows applications that allow users to lớn develop rich user interfaces having 3 chiều animations và rich colors with less code complexity. It is a vector-based rendering engine that uses hardware acceleration of modern graphics cards, which makes the Ul faster and highly scalable. WPF stands for Windows Presentation Foundation.

Bạn đang xem: Wpf c# là gì

WPF can be considered as an evolution over WinForms. It produces easy to lớn operate graphical display system for Windows. It offers easy separation between UI và business logic.

WPF applications can be deployed in your system as a standalone desktop program or hosted as an embedded object in a website.

In this C# WPF tutorial for beginners, you will learn WPF basics like:

Why WPF?

There are many reasons for using WPF platform some prominent ones are-

An ideal platform to lớn use if you require to deal with various truyền thông media typesWPF allows you khổng lồ create a skinned user interface. It also helps you when you need to load portion of the UI or want to bind XML data Resolution independence, so applications developed using WMF can be run on thiết bị di động devices or a 20-inch monitor WPF builds on DirectX instead of WinAPI. It offers the client computer’s graphics system. Therefore, offering greater graphic rendering powerSupports a flow document mã sản phẩm which enables “desktop publishing” chất lượng of the layoutAppearance and behavior are loosely coupled. This allows designers & developers lớn work on two separate modelsIn WMF framework you can graphically kiến thiết tools on simple XML documents instead of parsing codeAllows you to lớn use hardware acceleration for drawing the GUI, for better performance

History of WPF

Windows 1.0 was the first GUI environment from Microsoft. It is working as a layer on vị trí cao nhất of DOS, relying on the GDI and USER systems for graphic và user interface.

DirectX was introduced in the year 1995, as a high-performance graphics system. It was aimed at games và other graphics related environments. Over the years there are many versions released with Directx9 that provides a library to lớn use with mange.Net code.

WPF versionRelease Year.Net VersionVisual Studio VersionFeatures
3.020063.0N/AInitial Release.However, WPF development can be done with VS 2005.
3.520073.5VS 2008Modification and improvements in:Application model, binding, controls, documents, annotations, & 3-D Ul elements.
3.5 SP120083.5 SP1N/ANative splash screen support. New web browser control, DirectX pixel shader support.
4.020104.0VS 2010New controls: Calendar. DataGrid, DatePicker. Multi-Touch and Manipulation
4.520124.5VS 2012Faster thiết lập time & improved performance for Bitmap effects. New controls: Calendar. DataGrid, DatePicker.Multi-Touch và Manipulation
4.5.120134.5.1VS 2013New Ribbon controlNew INotifyDataErrorlnfo interface
4.5.220144.5.2NANo Major ChangeNo Major Change
4.620154.6VS 2015Transparent child window supportHDPI & Touch improvements

The latest stable version of WPF 5.0.6 which is released in April 2021.

Xem thêm: Chữ Ký Số Token Là Gì ? Bảng Giá Và Đăng Ký Nhanh Bảng Giá Và Đăng Ký Nhanh

Features of WPF


Congratulations! You have designed and created your first WPF application. Next in this WPF for beginners tutorial, we will see the difference between WPF & WinForms.

WPF vs. WinForms

It’s a newer framework, so it is more in tune with current standards.It’s older, so it is more tried & tested.
It’s flexible và features rich. You can kiến thiết very rich applications without coding or buying controls.Not so feature rich
Developers of 3rd party controls are focussed on compatibility with WPF as it’s the future.There are many third-party controls that you can buy or get for free.
XAML allows you khổng lồ create & edit your GUI easily. It allows the work lớn be split between a designer (XAML) & a programmer (C#, ASP.net, etc.).In Windows Forms all the code written in one place.
WPF can create user interfaces for both Windows applications and web applications lượt thích Silverlight and XBAP.No such support
WPF’s in-box control suite is limitedIn-box controls are very powerful

Type of Applications built with WPF

WPF is trying to replace webforms and windows forms – apps can be built lớn run in a browser or a standalone windowWindows Forms and WPF pages can co-exist in the same applicationYou can develop page/window applications

Quick Guide

The WPF full form is Windows Presentation FoundationIt is an ideal platform khổng lồ use if you require to giảm giá khuyến mãi with various truyền thông typesWindows 1.0 was the first GUI environment from Microsoft which was working on DOS and relying on the GDI & USER systemsWPF in .NET offers Interoperability with Windows Forms controlsWPF are divided into four different types like UIElement, FrameworkElement ContentElement & FrameworkContentElementThe most important components of part of WPF architecture are PresentationFramework, PresentationCore, CLR, Milcore, DirectX, User32, and KernelWPF is a newer framework compares WinForms, so it is more in tune with current standardsWindows Forms và WPF pages can co-exist in the same application