What’s new for WPF in .NET 7

Pankaj Chaurasia

Fiza Azmi

Ashish Kumar Singh

WPF community is filled with so many passionate individuals with truly amazing experiences and this post aims to highlight what has been done in the dotnet/wpf repo in past few months and thanking the amazing people behind all this. We are really grateful for the contributors who have consistently worked towards improving WPF. Here is a quick recap of what was accomplished in the past few months in the dotnet/wpf repository.

Performance

WPF in .NET 7 ships with number of improvements in the areas not just limited to unnecessary boxing/unboxing, use of Span for string manipulation, better allocation/deallocation of objects, memory improvements, font rendering etc. but also code cleanup and making way for future readiness.

Boxing/Unboxing

Boxing and Unboxing are computationally expensive processes. When a value type is boxed, a new object must be allocated and constructed. To a lesser degree, the cast required for unboxing is also expensive computationally.

Allocations

The more objects allocated on the heap, more is GC overhead in reclaiming those object post their lifetimes. Reducing such allocations in memory lowers GC overhead.

Miscellaneous

Special thanks to Stephen Toub for contributing many other performance fixes.

Accessibility

With a commitment to ensure WPF controls are accessible, below are the product improvements that made its way to WPF.

Bug fixes

While WPF remains fully supported and serviced on .NET Framework, most fixes and all new features will go only into .NET Core, where we have the opportunity to make bigger changes. Our community helped address some long-standing bugs in this release.

The above list is NOT exhaustive and many more bug fixes went thanks to our community contributors for their efforts in fixing them.

Infrastructure upgrades

One of the major areas for improvement voiced by community is the rate at which community contributions were accepted. With the below infrastructure upgrades, we intend to address the rate at which we accept community contributions.

Title Description
Test repository migration WPF codebase has more than 30K integration tests. These tests ensure sanity of the build with various OS and .NET framework combination matrix. As part of open sourcing the test infrastructure, we aim at moving all the tests from internal to Github. This would also enable community to add their own tests to the test repo.

We have open-sourced most of the basic regression tests that enables the community contributors to run those tests locally and debug them, in case there’s an issue with any of the PR submissions .

Running basic tests on each incoming PR Basic regression tests, (aka Daily Regression Tests or DRT(s)) that validates the basic behavior of controls, need to be run on each submitted PR to ensure that the changes do not cause any regressions. The end goal of this exercise is to make sure that we have a framework in place that allows running tests on incoming PRs. This would reduce the turn-around times on PRs, thereby increasing the velocity at which new changes / fixes can be merged into the repository.

We are now running these tests as a part of build on every incoming PR. In upcoming months, we plan to enhance these pipelines in terms of the reporting the status if test execution, to avoid manual lookup in logs for failures.

Ongoing activities

  • Tests repository migration still has a larger subset of tests that are yet to be ported.
  • Enabling running the bigger suite of test cases on community submitted PRs which would improve the turnaround time for feedback on PRs.
  • Clearing the backlog of PRs and issues.

Community

The community run-project started with the intent to enable developers in making big difference in shaping WPF going forward. To all the WPF developers, your work is invaluable. We’d like to thank the below contributors for their efforts in fixing long standing issues and contributing performance and functional improvements.










Summary

We’d encourage you to try out WPF on .NET 7 and let us know how these improvements have helped. We are always looking for feedback on how to improve the product and look forward to your contributions. We would like to thank everyone that is committed to making WPF better as a product. Our goal is to continue improving WPF, while growing our community so that we can bring you the best developer experience possible. Your help and input is very much required. Whether that is through triaging issues, updating documentation, participating in discussions or writing code, we appreciate all of your help!

25 comments

Discussion is closed. Login to edit/delete existing comments.

Feedback usabilla icon