Performance comparison of Winforms and WPF

wpf vs winforms 2019
wpf vs winforms vs uwp
wpf vs winforms reddit
winforms vs wpf pros and cons
wpf tutorial
winforms to wpf tutorial
wpf latest version
what is winform

Since XAML gets compiled, there should be no difference in execution of code like this. Winforms (code like):

Form formPeter = new Form();
Textbox textbox = new Textbox();
Label l1 = new Label1();

Xaml does not get parsed at runtime, as I thought... :-)

But what about rendering/execution of big forms with lot of controls? Which technology is faster?

Which Technology is faster? I'm afraid your question doesn't really have a simple answer.

Your comment about XAML not being parsed at runtime is both true and false. While the XAML is not parsed a normalized binary version of it (embedded as a resource in your application) called BAML is parsed at runtime. To say DirectX is faster than GDI is also something of a simplification - WPF and GDI-based rendering technologies just have different performance characteristics. For example WPF uses a retained rendering mode, whereas WinForms and other GDI-based technologies do not. WPF objects tend to be much heavier-weight because they support many many many more properties than their winforms counterparts. We have decades of knowledge on how to make GDI go pretty fast, and only a relatively short time with WPF and XAML.

WPF is sufficiently fast for writing applications, but you need to be constantly vigilant that your element count doesn't blow out (by creating overly complicated templates for example, and then having them repeated hundreds or thousands of times in your UI). Also WPF performs differently on different graphics hardware (since it calls down to DirectX internally). 2D content should be fine in WPF, even if it is totally rendered in software (say the way it would on a virtual machine) but animated, anti-aliased 3D with lots of elements requires real GPU power. As time moves on and graphics hardware becomes more powerful and prevalent and knowledge about how to performance-tune WPF improves we should see WPF pull further ahead (assuming it is slightly so now...for some scenarios...sometimes). So I guess the answer is "it depends".

Performance comparison of Winforms and WPF, Since WPF's first release, people keep discussing whether its performance is comparable with WinForms, or whether this platform will eventually die. Now we'​re  Winforms vs WPF both are being mainly used for the same purpose for developing and designing the windows applications but WPF can be used for the web application as well. The difference between them is mainly of scalability, performance as WPF can render fast as compared to windows forms, complexity, and support.

WPF uses DirectX for rendering (which is much faster) instead of the native Windows GDI.

As you might already know, Native GDI is bitmap based. As WPF is vector based, WPF can make use of hardware support, in a much better way when compared to GDI.

How ever, the decision to choose WPF or Winforms heavily depends on other factors as well - The flexibility you need in the UI, how much media support your application needs etc. WPF is not a replacement for a Winforms - and it is not a silver bullet for all the problems.

With more hardware acceleration features coming up, WPF can deliver much better than your Winform applications.

A couple of interesting blogs I read ealier.

John's Post

Rob's Post

FlexGrid Performance: Compare WinForms, WPF, UWP Performance, performance comparison of windows forms vs WPF. I need to be able to explain/demonstrate that WPF performance is on par with win forms. Because WPF (and WinForms) use a lot of Windows-specific features, WPF applications will only run on Windows. It’s also true for WPF applications targeting the .NET core platform. That is somewhat unintuitive because .NET core is best known as a cross-platform framework, but makes sense if you think about the history of WPF.

WPF drawing is much faster, but objects are heavier. If you throw in 1000 separate buttons, it will be crawling. On the other hand, those buttons can have complex transparency and gradients without significant performance hit.

WPF / Winforms Performance Comparison - MSDN, Microsoft Windows Presentation Foundation also known as WPF is a user interface For drawing GUI with better performance it uses hardware acceleration; You Compared to WPF, WinForms has much better design-time  For WinForms version we use WindowsFormsHost which might add some overhead. WPF version uses standard ListCollectionView while UWP version uses our own C1CollectionView implementation. UWP platform shows different performance depending on compilation options. Debug version might be faster than release.

WPF Vs WinForms – What To Choose?, The single most important difference between WinForms and WPF is the fact for better performance; It allows you to make user interfaces for both Windows  In general, WPF charts are slower than WinForms charts. The lack of real rendering power of System.Windows.Media has led several chart manufacturers to use desperate measures in improving their performance. But that’s only cheating and shows total disrespect to the customers that don’t check these things by themselves.

WPF vs. WinForms, The article is about window form controls and wpf controls performance. The difference between them and internals of how they are processed. Much has changed in the year and a half since my original performance blog post and I thought it would be a good idea to repeat the tests. However, this time I wanted to be more thorough, including a few different types of tests and also using WPF instead of Silverlight, due to the number of email requests I have had for a WPF charting comparison.

Windows Form Controls vs WPF Controls Part-2 (Performance , Great performance (You may always say it is WPF application by worse rendering performance, comparing to WinForms); There are great  Even with UWP JIT, UWP Listview performance and resource usage were superior from WPF. There was no lag (trying to load the items) on both. This was a simple listview.

WPF vs WinForms Reconsidered, Because WPF (and WinForms) use a lot of Windows-specific features, NET technology which was written from scratch resulting in a much better performance​. the more complex controls in other platforms by comparison. One obvious answer is that WPF offers a richer user experience than WinForms, allowing for animations even 3D in the user interface for example. From a development perspective it goes a long way to enforce the separation of the User Interface (in the XAML) from the business logic (in VB.NET or C#) which is always a good thing.

  • I'd say WPF objects tend to be lighter-weight due to WPF's sparse storage infrastructure. Dependency property values are only stored if they vary from their default value, so huge savings on memory are made.
  • I'm curious and a bit pessimistic about performance on terminal server.
  • As well you should be, Guge. WPF sends graphics rather than primitive commands or tokens representing controls. AFAIK, Microsoft have not committed to doing anything to fix this situation, either.