Microsoft emits Preview 3 of next-gen WinUI framework, says Linux support 'is not off our roadmap'

One framework to rule them all? Or yet another one to add to the confusion?


Microsoft has released Preview 3 of WinUI 3, its next-generation framework for Windows desktop applications.

Those still trying to keep track of Microsoft’s plans with regard to Windows desktop development were given some new insights in the latest preview of WinUI 3 and an associated community standup with Kevin Gallo, corp VP of the Windows Developer Platform.

WinUI 3, you might imagine, is the successor to WinUI 2; and in some ways it is, but it is also a new direction. WinUI 2 (there is no WinUI 1) is a library of controls for UWP (Universal Windows Platform), this being the not-very-universal application platform that evolved from the Windows Runtime introduced for Windows 8.

WinUI 3 on the other hand is the heart of Project Reunion, which Gallo described as “a common platform for new apps and APIs so that they will work down-level across supported versions of Windows.”

Gallo said at the standup that the big deal in WinUI 3 is not new features, since many of the components have been lifted from WinUI 2, but that the framework is “delivered in a more flexible way.”

WinUI 3 is no longer just for UWP, but also works in desktop applications, and its content can appear in an HWND – a window identified by a number called a window handle, as used since the earliest days of the operating system.

That said, there are new features, including the WebView 2 Chromium-based web browser component, and a RenderTargetBitmap class which will be familiar to developers using WPF (Windows Presentation Framework) – though it only works with XAML content for now. The goal, said Gallo, is to make WinUI 3 suitable for large, complex applications, something for which WPF is currently more suitable than UWP.

XAML

The XAML Control Gallery project is the starting point for exploring the WinUI 3 control library. Source: Microsoft. Click to enlarge

Principal program manager Ryan Demopoulos demonstrated new Visual Studio tooling for WinUI 3, including Live Property Explorer, allowing properties to be changed on the fly while debugging, without persistence; and XAML hot reload, which allows the XAML source code to be modified while debugging, with persistence.

“Simple question, simple answer please,” asked a developer at the standup. “For a new desktop app what is your recommendation, UWP? WinUI, WPF or WinForm? if all then how to decide which one?”

Unfortunately no simple answer is available. WinUI 3 is in preview, after all, and Microsoft emphasises that the preview is only intended for trying things out. The API could change before release and break code.

There is also mixed messaging. WinUI 2.x will still be developed after WinUI 3 is released, and version 2.5 is expected in December. Some things in WinUI 2.x will not be in WinUI 3.0, with mixed reality an example.

Gallo talked about no longer having binary choices, but being able to mix and match in the brave new Reunion world. At the same time, he also said that “we are recommending WinUI 3 as the way forward for all user experiences.”

Everything's fine!

The Windows desktop is more popular than ever, according to Microsoft, with PC use booming during the COVID-19 lockdown. While that may be true, the app world has changed profoundly since the heyday of PC applications.

JavaScript runs like lightning, enabling rich browser applications or PWAs (progressive web applications, which can install to the desktop); and mobile platforms are also ascendant. This drives developers towards cross-platform solutions, so another obvious question is whether WinUI 3 can work as a cross-platform framework?

A variant of WinUI already does, thanks to the Uno platform which lets developers target Windows, WebAssembly, iOS, macOS, Android and Linux. But what about Microsoft’s official framework? Might it run, for example, on Linux, where the .NET runtime already works well?

““We’ve some requests for allowing WinUI to run cross-platform,” said Gallo. “I continue to just ask for the scenarios that developers want and what they’re trying to target … our goal is really to make sure that developers can build best of breed apps on Windows and then have an easier transition to write cross-platform experiences. This is not off our roadmap, it’s not on our roadmap, it’s something that we’re listening to the community to try and understand if it makes sense.”

That’s a definite maybe then. In the meantime though, developers have many other choices, from Uno to React Native to Google’s Flutter, leaving WinUI 3 looking almost isolated.

The primary goal though is to be a desktop framework for Windows that will make sense for developers currently using one of Microsoft’s other desktop frameworks - as long as they use C# or C++, since VB is not supported. Or is it just going to be yet another one? Now is too soon to draw conclusions, and it appears that a release version of WinUI 3 remains at least six months away. “The end is approaching,” said Demopoulos. “We’re aiming for a date in the first half of next year,” though he asked developers not to bet on the accuracy of that prediction.

What about open source? Microsoft has gone the open source route with most .NET code, but WinUI 3 is absent from GitHub. Gallo said that open source, “is a high priority thing after 3.0 comes out. Open source is a lot of work. If we focus on the open source part of it, it just delays it even more.” ®


Biting the hand that feeds IT © 1998–2020