Mobile Framework Deep Dive

.NET MAUI

Microsoft's "Multi-platform App UI" — write iOS, Android, macOS, and Windows apps in a single C# codebase. The official successor to Xamarin.Forms.

C#.NETXAML or C#Native UIMicrosoft
← Back to Client Side
Quick Facts

At a Glance

Language
Released
2022 · Microsoft
UI
XAML or C# Markup
Targets
iOS, Android, macOS (Catalyst), Windows
Predecessor
Xamarin.Forms
IDE
Visual Studio / Rider / VS Code

Basic Concepts

  • One project, many targets: a single .NET project produces iOS, Android, macOS, and Windows binaries.
  • XAML describes UI declaratively; C# Markup is the code-only alternative.
  • MVVM is the canonical pattern — views bind to view-models via data-binding.
  • Handlers map MAUI controls to native platform widgets (instead of Xamarin's older Renderers).
  • Hot Reload for both XAML and C# during development.
Syntax

Taste of .NET MAUI

<!-- ProductListPage.xaml -->
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             x:Class="MyApp.ProductListPage"
             Title="Products">
  <CollectionView ItemsSource="{Binding Products}">
    <CollectionView.ItemTemplate>
      <DataTemplate>
        <HorizontalStackLayout Padding="12">
          <Label Text="{Binding Name}" />
          <Label Text="{Binding Price, StringFormat='${0}'}" />
        </HorizontalStackLayout>
      </DataTemplate>
    </CollectionView.ItemTemplate>
  </CollectionView>
</ContentPage>
// ProductListViewModel.cs
public partial class ProductListViewModel : ObservableObject
{
    [ObservableProperty]
    private ObservableCollection<Product> products = new();

    [RelayCommand]
    private async Task LoadAsync()
    {
        var data = await _api.GetProductsAsync();
        foreach (var p in data) Products.Add(p);
    }
}
Mechanics

Key Features

Handlers Architecture

Each MAUI control (Button, Entry, CollectionView…) maps to a per-platform handler that wraps the real native widget. You can swap or extend handlers per platform — much cleaner than Xamarin's renderers.

MVVM with Community Toolkit

The CommunityToolkit.Mvvm source generators ([ObservableProperty], [RelayCommand]) eliminate most ViewModel boilerplate — concise, testable, AOT-friendly.

Blazor Hybrid

Embed Blazor web components inside a MAUI shell — share UI between web (Blazor Server / WebAssembly) and native apps. A unique selling point in the cross-platform space.

Essentials & Native APIs

Microsoft.Maui.Essentials exposes cross-platform APIs for sensors, geolocation, file system, secure storage, and more — one C# call, four platforms.

Ecosystem
  • NuGet packages — full access to the .NET ecosystem.
  • Telerik / Syncfusion / DevExpress — commercial control libraries with rich grids and charts.
  • Sharpnado / The49 — popular community libraries.
  • App Center / Visual Studio App Center successors for distribution & analytics.
Trade-offs

Strengths & Weaknesses

Strengths
  • Single C# codebase across mobile + desktop.
  • Best-in-class IDE (Visual Studio, Rider).
  • Full .NET ecosystem (NuGet, EF Core, SignalR).
  • Blazor Hybrid shares code with web frontends.
Weaknesses
  • Smaller mobile community than Flutter or React Native.
  • iOS build still requires a Mac for signing.
  • Migration from Xamarin.Forms is significant.
  • UI feels less polished out-of-the-box vs SwiftUI/Compose.
Where It Shines

Sweet Spots

Microsoft-Stack Shops

Teams already invested in C#, Azure, EF Core, and Visual Studio.

Enterprise LOB Apps

Field-service, inventory, CRM clients across phone + desktop.

Blazor + Mobile

Share components between web and native via Blazor Hybrid.

Windows + Mobile Pairs

One of the few stacks with strong Windows desktop + mobile parity.

Continue

Other Mobile Frameworks