Avalonia project grows in 2023, highlighting Microsoft’s cross-platform UI stumbles

Avalonia project grows in 2023, highlighting Microsoft’s cross-platform UI stumbles

The open source Avalonia project, which implements something like WPF (Windows Presentation Foundation) as a cross-platform GUI framework for .NET, has grown strongly in 2023, despite Microsoft’s investment in MAUI (Multi-platform App UI).

Mike James, CEO of AvaloniaUI OÜ (the Estonia-based company which supports the project), claimed in an end-of-year post that Avalonia is now “the most popular client UI technology in the .NET ecosystem”, based on GitHub stars versus WPF and MAUI. Stars are a poor indicator of actual usage, but nevertheless James can point to some solid indicators of growth, with 387,000 downloads of version 11, released in July 2023, 363 contributors to the main project, and support from the .NET add-on ecosystem.

During 2023 the project has released an early version of a Visual Studio Code extension which enables visual preview of XAML, the presentation language for both WPF and Avalonia. There is also a new documentation portal. The number of employed staff has grown to nine full-time developers. As James explained in another post, the project’s viability rests not on donations but on income from support, development services, and XPF licensing. XPF is based on Avalonia but is compatible with WPF, offering a pathway to modernization and cross-platform for organizations with legacy WPF applications.

“The total amount generated from donations per year wouldn’t even cover a week’s wage bill,” James said.

Visual Studio code with the Avalonia extension to preview XAML UIs

When Microsoft took .NET open-source and cross-platform back in 2014 it left a notable gap: there was no cross-platform GUI library. The company did eventually port Windows Forms and WPF to run on .NET Core, but only on Windows. An official route for cross-platform .NET clients came with the acquisition of Xamarin, from which MAUI emerged, but problems include buggy releases, incompatibility with WPF XAML, and the fact that MAUI is mobile-oriented; on macOS it builds Catalyst applications designed to share code with iPad apps. Linux is not supported at all.

The growing interest in Avalonia is not only a reflection of the hard work put into the project by its developers and contributors, but also a consequence of Microsoft’s failure to come up with a satisfactory solution for its WPF and Windows Forms users who now need to support macOS, for example.

There is another aspect to Avalonia’s popularity. There are a variety of approaches to coding cross-platform desktop or mobile user interfaces, with the main strands being to wrap native controls, or to draw the user interface widgets with custom code, or to use web technology. Xamarin and its evolution, MAUI, wrap native controls, while Avalonia draws its own. There will always be advocates on both sides of this debate, but it is notable that the Google-sponsored Flutter, now the most popular cross-platform framework, also draws its own controls, avoiding the complexities of attempting to ensure exactly equivalent behavior across different operating systems.

Ambient Weather, an Avalonia demo app by cross-platform development company UXDivers

According to software engineer Jumar Macato, abstracting the native UI “is fine for platforms like iOS, Android, macOS and Windows but becomes difficult for desktop Linux and near impossible for embedded.”

Avalonia usage remains tiny in comparison to Flutter, React Native, or browser-based approaches like Electron, and developers are still likely to encounter quirks. These are reducing though and if the project can sustain its growth, it may be the best solution for organizations with WPF projects to migrate, or who prefer to build with C# rather than JavaScript, TypeScript, or Flutter’s Dart.