Four .NET UI approaches
Platform overview
| Framework | Typical targets | UI approach |
|---|---|---|
| Blazor | Web browsers; hybrid via supported hosts | Razor components |
| .NET MAUI | Android, iOS, macOS (Mac Catalyst), Windows | XAML and C# |
| Uno Platform | WebAssembly, Windows, mobile and desktop targets | WinUI-style XAML and C# |
| Avalonia | Windows, macOS, Linux; additional supported targets | Avalonia XAML and C# |
Minimal UI examples
Blazor:
<button @onclick="Increment">Clicked @count times</button>
@code { private int count; private void Increment() => count++; }
MAUI XAML:
<Button Text="Click" Clicked="OnClicked" />
private int count;
private void OnClicked(object sender, EventArgs e) => ((Button)sender).Text = $"Clicked {++count} times";
Uno WinUI XAML:
<Button Content="Click" Click="OnClicked" />
Avalonia XAML:
<Button Content="Click" Click="OnClicked" />
For Uno and Avalonia, handle click events in the corresponding view code-behind or bind a command from a view model.
Performance experiment
Build the same app in each framework: 1,000 virtualized list items, local filtering, navigation between two pages, and a JSON API request. Compare release builds on the same hardware and OS. Record cold start (ms), memory (MB), publish size (MB), list scroll smoothness, and implementation effort (hours). Do not compare debug vs release, or browser vs native without clearly separating environments.
Choosing
Blazor is a natural choice for web UI; MAUI for .NET native mobile applications; Uno for WinUI-style multi-target applications; Avalonia for desktop-first cross-platform apps, especially Linux. Actual simplicity and performance depend on target platform and app architecture.