Introduction
.NET Multi-platform App UI (MAUI) is Microsoft's framework for building native cross-platform applications with C# and XAML. It unifies Android, iOS, macOS, and Windows development into a single project structure, replacing Xamarin.Forms with a modernized architecture built on .NET 6+.
What .NET MAUI Does
- Enables single-project development targeting Android, iOS, macOS, and Windows
- Provides native UI controls that map to platform-specific widgets
- Offers hot reload for both XAML and C# during development
- Includes a dependency injection container and app lifecycle management
- Supports Blazor Hybrid for embedding web UI within native app shells
Architecture Overview
MAUI uses a handler architecture where each cross-platform control maps to a platform-specific native control through handler classes. The framework runs on .NET runtime with platform-specific workloads (Android uses Mono, iOS uses AOT compilation, Windows uses WinUI 3, macOS uses Mac Catalyst). A single .csproj file manages all platform targets with conditional compilation and platform-specific resource management.
Self-Hosting & Configuration
- Install the .NET SDK with MAUI workload via
dotnet workload install maui - Configure target frameworks in the .csproj file (net8.0-android, net8.0-ios, etc.)
- Manage app identity and permissions in
Platforms/folder per target - Set up resources (fonts, images, splash screens) in the shared
Resources/directory - Use
MauiProgram.csto configure services, fonts, and platform-specific handlers
Key Features
- Single project structure eliminates the need for separate platform projects
- Blazor Hybrid support lets you reuse web components inside native apps
- Native performance with platform-specific rendering (no WebView overhead)
- Extensive community ecosystem of controls and libraries via NuGet
- Visual Studio integration with designers, profilers, and device emulators
Comparison with Similar Tools
- Xamarin.Forms — predecessor to MAUI; MAUI modernizes the architecture with handlers and single-project structure
- Flutter — uses Dart with custom rendering; MAUI uses C# with native platform controls
- React Native — JavaScript with native views; MAUI targets developers already in the .NET ecosystem
- Uno Platform — also targets multiple platforms with C#/XAML but renders via SkiaSharp; MAUI uses native controls
- Avalonia UI — cross-platform .NET UI with custom rendering; MAUI provides native look and feel per platform
FAQ
Q: Is .NET MAUI the replacement for Xamarin? A: Yes. Microsoft officially transitioned from Xamarin.Forms to .NET MAUI. Xamarin support ended in May 2024 and MAUI is the recommended migration path.
Q: Can I use .NET MAUI on Linux? A: Linux is not officially supported as a deployment target. Community efforts exist but Microsoft focuses on Android, iOS, macOS, and Windows.
Q: Does MAUI support hot reload? A: Yes. Both XAML Hot Reload and .NET Hot Reload are supported, allowing you to see UI and logic changes without restarting the app during debugging.
Q: Can I mix Blazor web components with native MAUI views? A: Yes. Blazor Hybrid lets you host Razor components inside a BlazorWebView control within your MAUI app, combining web and native UI in one application.