Microsoft is investing further in the familiar Windows Presentation Foundation (WPF) and Windows Forms (WinForms) desktop frameworks, as well as React Native for Windows which is in preview with a new architecture.
In a post on GitHub, Principal Software Developer Jeremy Kuhne said that, to improve WPF and WinForms engineering agility, “In .NET 10 we plan to start sharing code between the two platforms.” This will be the next version of .NET, expected around one year from now.
At the Ignite event under way in Chicago, Microsoft also highlighted enhancements to WPF including support for light and dark themes, rounded corners for controls, and compliance with Windows 11 design guidelines.
There are many strands to Windows desktop development. The modern way is encapsulated in the Windows App SDK, also known as Project Reunion, which is the evolution of what began as the Windows Runtime for Windows 8, then UWP (Universal Windows Platform) for Windows 10, and then WinUI 3.
The Windows App SDK is not the whole story, though. The old .NET frameworks, WinForms and WPF, remain popular, and not only because of legacy code, but also because of high productivity and flexibility. The Windows App SDK requires Windows 10 1809 or higher, which can be a limitation in some environments.
Microsoft is also committed to React Native, using JavaScript or TypeScript to build Windows applications, especially in cases (like Microsoft Office) where the same code needs to run on Web and mobile as well as desktop.
During Ignite, Microsoft is educating attendees on how to modernize applications “by learning how Office leverages Windows App SDK,” which turns out to have a lot to do with React Native.
React Native v0.76 or later has support for the new architecture, described as ” a complete rewrite of the major systems that underpin React Native”. The new architecture includes a native module system, which is a rewrite in C++ of how JavaScript and the native platform communicate, and which also enables application modules to be written in C++ if required, for best performance.
There is also a new C++ native renderer, a well-defined event loop for closer alignment to web specifications, and removal of the async bridge, to speed initialization and allow for synchronous calls to the native API.
In the Windows version of React Native, the new architecture allows preview access to new capabilities including advanced UI composition in the Windows App SDK.
As for the Windows App SDK itself, it is getting new features including a new TitleBar control with full support for features such as custom controls, back button, automatic show and hide of elements based on width, and the default buttons for minimize, maximize and close that users expect. This is currently in the “experimental channel,” and addresses a long-standing pain point with the Windows App SDK.
Recently added (in Windows App SDK 1.6) was ahead-of-time compilation for .NET, reducing start-up time and memory consumption.
Developers keen to get the most up to date look and feel on Windows 11 will use the Windows App SDK; but others will be relieved to see continuing investment in the highly accessible WinForms and WPF frameworks.