Xamarin.Forms, .NET Maui and the Uno Platform

The .NET Maui team at Microsoft recently dropped Release Candidate 1, so I thought it worth taking a quick look at how it compares to both it’s predecessor, Xamarin.Forms, and the Uno Platform, which is arguably the market leader for building multi-platform application with .NET.

If you missed the announcement by Microsoft, here’s a tweet by David Ortinau which has links to the blog post covering the announcement.

As a starting point for comparing .NET Maui, I’ll start with a table that compares various attributes. The following table originally came from a tweet by Luis Matos and has been updated and extended to include the Uno Platform:

Xamarin.Forms.NET MauiUno Platform
Platforms
AndroidAPI 19+API 21+API 21+
iOS9-1510+8+
WindowsUWP – Microsoft
WPF – Community
UWP – Not Supported
Win32 (WinUI) – Microsoft
UWP
Win32 (WinUI)
WPF (Skia)
MacOSCommunityMicrosoftUno
LinuxCommunityCommunityUno
TizenSamsungSamsungUno
WebUno (Wasm)
Features
RenderersTightly coupled to BindableObjectLoosely coupled, no Core dependenciesN/A
Templated (ala Lookless) ControlsNoNoYes
App ModelsMVVM, RxUIMVVM, RxUI, MVU, BlazorMVVM, MVU-X
Single ProjectNoYesYes
Multi-TargetingYesYesYes
Multi-WindowNoYesNo
Devices capabilitiesXamarin EssentialsMaui EssentialsMapped WinRT APIs
Misc
.NETXamarin.iOS, Xamarin.Android, Mono, .NET Framework, ….NET 6+Mix
AcquisitionNuGet & Visual Studio InstallerdotnetNuGet (uno-check)
Project SystemFranken-projSDK StyleMix
dotnet CLINoYesYes
Tools
Visual Studio 2022YesYesYes
Visual Studio 2022 for MacYesYesYes
Visual Studio CodeNoYesYes
Services
FigmaNoNoYes
SupportGitHub IssueGitHub IssueGitHub Issue
Paid Support

Let’s run through some of the notable points in this table:

  • Windows support for .NET Maui leverages the recently released Windows App SDK and WinUI, rather than UWP – this will be somewhat limiting in the short term. Whilst the WinAppSdk is clearly the path forward by Microsoft, it still suffers from worse performance than UWP and limitations on some of the built in capabilities that UWP had. By comparison, if you’re building with Uno, you can choose whether your Window app targets UWP or WinUI.
  • There’s currently no support for building a web application using either Xamarin.Forms or .NET Maui. Uno leverages webassembly (WASM) to deliver a web application from the same XAML based application logic.
  • Uno doesn’t use renderers but does leverage the underlying platform controls. Uno controls are all Templated Controls (aka lookless controls) which means you can completely re-template the control without adjusting their behaviour.
  • Uno Extensions support a more reactive style model for building view models using Uno Reactive called MVU-X and advanced region-based navigation model using Uno Navigation.
  • .NET Maui includes multi-window support which is something that’s mainly relevant to macOS and Windows where it makes sense to have multiple windows in some applications. Uno applications can leverage multiple windows on Windows using the UWP or WinUI multi-window apis.
  • Device capabilities (eg GPS/Location) can be accessed using the Xamarin or Maui Essentials. For Uno applications device capabilities can be accessed using the corresponding WinRT API that has been mapped for each supported platform (eg Geolocation).
  • Xamarin.Forms has separate projects for each target platform, each with it’s own project type (hence Franken-proj). .NET Maui uses a single SDK style project (although in theory you could still have a separate project for each target platform). Uno supports targeting Xamarin.iOS / Xamarin.Android, as well as .NET for Android and iOS (net6). This means that depending on which target platforms you opt for, you’ll either use old style projects (ie Franken-proj), or SDK style projects
  • Technically all the frameworks support multi-targeting (original table indicated that Xamarin.Forms does not). However, Xamarin.Forms doesn’t use multi-targeting for the target platform projects (unlike .NET Maui that uses multi-targeting to allow it to target multiple platforms from the single project).
  • The Uno Platform also offer some additional services such as paid support and a plugin for figma (preview).

The .NET Maui team are edging closer to their GA release and there are still a lot of moving parts that’ll need to come together. Hopefully this comparison is useful if you’re trying to work out which framework to use for building a multi-platform application.