Microsoft Breathes Life into Win32 Apps with .NET Core 3.0 and UWP XAML Islands
At the beginning of March and at its developer conference in May, Microsoft made several announcements about the future of Win32 apps. In this Ask the Admin, I’ll look at how those developments will affect the application landscape in Windows.
It’s no secret that Microsoft has been aggressively pushing the Universal Windows Platform (UWP) over the last few years. Though more recently, we haven’t been hearing as much about it. That’s not to say that Microsoft has abandoned the platform. Far from it. But now that Microsoft doesn’t have a mobile offering, the importance of UWP seems diminished. Developers haven’t taken up the UWP gauntlet in big numbers, so Microsoft is looking to bridge more legacy apps to UWP. At the same time, it wants to expand the features of Windows Presentation Foundation (WPF) so that it’s not frozen in the past.
Bridging Universal Windows Platform
Microsoft’s Desktop Bridge allows developers to port its applications to UWP with only minimal changes to the code. But it does require access to the source code. As I mentioned in MSIX Installer to Bring More Win32 Apps to Microsoft Store on Petri, a new unified cross-platform installer technology will enable system administrators and developers to move win32 apps to the Microsoft Store even when there’s no access to the source code.
Dropping Backwards Compatibility and .NET Core
On the back of that news, it makes sense for Microsoft to continue investing in more popular frameworks, like WPF. Microsoft announced in March that it will continue development of Windows Forms and WPF on top of .NET Core 3.0, with plans to add more controls and capabilities. So why does shifting WPF and Windows Forms to .NET Core make a difference? According to Microsoft corporate VP Julia Liuson, the .NET Framework 4.x is held back by the requirement for complete backward compatibility on Windows. But because .NET Core is a cross-platform framework, the same restrictions don’t apply, allowing Microsoft to move forward in a way that’s not possible with the Windows-only .NET Framework. Liuson told the Register’s Tim Anderson “.NET Core has evolved as a componentized runtime. It gives the ability to make it an app framework, versus a component of Windows.”
In addition to supporting Windows desktop applications for the first time, Microsoft also said that it will be possible to run multiple instances of .NET Core 3 side-by-side on the same device, allowing organizations to update Windows Forms, WPF, and UWP applications to a new version of .NET Core without updating the entire system. Alternatively, organizations can opt to use a global install, like how the .NET Framework works today. It will also be possible to easily convert existing desktop applications to .NET Core 3.0, which is due for release sometime in 2019. It will be available in preview form later in 2018.
UWP XAML Islands
Announced at the beginning of March, UWP XAML Islands is the technology that will bring UWP controls to WPF, Windows Forms, and native win32 apps. And along with that, developers will be able to use the Fluent Design System, Microsoft’s design language for Windows 10. In a blog post by Joe Belfiore, Corporate Vice President of Windows, Microsoft announced:
“Updates helping you support the Fluent Design System, so you can create immersive, deeply engaging experiences with Microsoft’s updated design language. Now every organization can make beautiful solutions that empower your customers to do more. With UWP XAML Islands, you can access the more capable, flexible, powerful XAML controls regardless which UI stack you use—whether it’s Windows Forms, WPF, or native Win32.”
Desktop apps can access the UWP browser control, which uses Microsoft Edge, allowing developers to ditch Internet Explorer. For more information on hosting UWP controls in WPF and Windows Forms applications, see Microsoft’s site here.
Past Meets Present and Future
Microsoft’s announcements indicate it has conceded that WPF is still, and will be for some time, the preferred UI stack on Windows. The ability to drop IE in favor of Edge via the UWP browser control is an important step forward and might even mean that Microsoft can remove IE from at least some Windows 10 SKUs in the future. But I’ll be interested to see how Microsoft addresses updating .NET Core 3.0 when multiple instances are running on the same device and how that will be managed.
Follow Russell on Twitter @smithrussell.