.NET MAUI: the evolution of Xamarin.Forms
Microsoft describes .NET Multi-platform App UI (.NET MAUI) as the evolution of Xamarin.Forms. It's a framework for building native apps for Android, iOS, macOS and Windows from a single C# (and XAML) codebase.
Supported targets
| Platform | Under the hood |
|---|---|
| Android | .NET for Android |
| iOS / iPadOS | .NET for iOS |
| macOS | Mac Catalyst |
| Windows | WinUI 3 (Windows App SDK) |
What changed from Xamarin.Forms
- Single project: one
.csprojmulti-targets every platform. Fonts, images and the splash screen live in sharedResourcesfolders, and platform code goes inPlatforms/. - Handlers instead of renderers: controls map to native views through lightweight handlers that you can customize without subclassing.
- Part of .NET: MAUI ships as a .NET workload (
dotnet workload install maui) and follows the .NET release cadence. - Modern app startup: a
MauiProgrambuilder with the same dependency injection, configuration and logging you use in ASP.NET Core. - Blazor Hybrid:
BlazorWebViewlets you reuse Razor components inside a native app.
Heads-up: Xamarin support ended on May 1, 2024. Existing Xamarin.Forms apps should migrate to .NET MAUI. The .NET Upgrade Assistant automates part of the work.
Hello, MAUI
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(f => f.AddFont("Inter-Regular.ttf", "Inter"));
builder.Services.AddSingleton<MainViewModel>();
builder.Services.AddSingleton<MainPage>();
return builder.Build();
}
}
When to choose MAUI
- Your team already knows C#/.NET and you want one codebase for mobile and desktop.
- You need native controls and device APIs (camera, sensors, secure storage) in C#.
- You want to share business logic and models with an ASP.NET Core backend.
If you only target the web, Blazor is the simpler choice. If pixel-identical custom UI on every platform matters most, compare MAUI with alternatives such as Avalonia or Uno Platform before committing.