Considering Xojo Alternatives -- Avalonia

As I mentioned in “Considering Xojo Alternatives – WinForms”, if Microsoft has a true cross-platform technology, it is .NET MAUI. But that is still evolving and fairly young, having become available in prerelease I believe in 2020.

An interesting alternative to MAUI that’s already ten years old is the open source Avalonia framework. While MAUI is based on XAML and the use of native controls on each platform, Avalonia is an “opinionated” framework that uses Skia to push pixels to the display itself, such that it can, if you wish, look identical on all platforms, such is the level of detailed control inherent in that. Some use cases favor native controls, others favor consistency on all platforms. It’s also somewhat a matter of personal taste – not just of developers, but how developers perceive the expectations of their users.

I had heard in the past that Avalon has had to work to get itself on a performance par with other frameworks and this, and the relatively leisurely pace of progress in the early days of this open source effort, is what has held it back. But today in terms of downloads, it’s running neck-and-neck with .NET MAUI, no small feat.

I’m currently working through [] <=this introductory video and like what I see so far.

The video is from the just-completed JetBrains Ryder online conference which I didn’t have time to attend live, but I believe it’s publicly accessible. If not, let me know and I’ll see if it can be worked around.

I have been digesting the above video in small doses throughout the day and I have to say it’s quite impressive. In addition to native Avalonia controls, you can use MAUI controls if MSFT or a MAUI controls vendor has controls you want to use in an Avalonia application. They have even taken WPF and stripped out its rendering engine and replaced it with Avalonia so that you can actually compile a WPF app and run it on Mac or Linux with no changes (if you don’t care how it looks) or minimal changes (if you want native window behavior on the target platform). Mobile and web coming next year for that.

As to project types – you can use XAML (which appears to be the default) or more of a WinForms-like approach, among others – there are several project types.

Interesting options exist !

I should point out that this feature (called XPF) is commercial / premium and there’s an associated cost. They use the revenue to help fund the core open source project. It’s certainly not a problem for the intended audience – some large company with a big investment in WPF apps who wants to move them forward without an expensive and time-consuming rewrite.

Perusing the forums, I see that XPF has partial support for WinForms controls as well as WPF (and, via a container control, MAUI) controls, but does, unfortunately, not support porting a complete WinForms app, nor can I find any announcements about that.

huh, neat but nobody cares about the warning “packages with vulnerabilities” at 27:30?

Yeah I saw that. Might be significant. Might not. The presenter is one of the core devs, so he might be running with prerelease libs or something.