Avalonia UI is an open-source framework for building graphical interfaces with C# and XAML that run on Windows, macOS and Linux, as well as iOS, Android, the browser (WebAssembly) and embedded devices.
How it works
Unlike frameworks that use each system's native controls, Avalonia draws the whole interface itself with its own rendering engine based on Skia. The result is an application that looks identical on every platform, pixel for pixel.
The first project
dotnet new install Avalonia.Templates
dotnet new avalonia.mvvm -o WarehouseManager
cd WarehouseManager
dotnet run
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:WarehouseManager.ViewModels"
x:Class="WarehouseManager.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Title="Warehouse manager" Width="900" Height="600">
<StackPanel Margin="20" Spacing="10">
<TextBlock Text="{Binding Title}" FontSize="24" />
<Button Content="Refresh" Command="{Binding RefreshCommand}" />
</StackPanel>
</Window>
Strengths
- Linux as a first-class citizen, alongside Windows and macOS.
- XAML familiar to those coming from WPF, with a styling system inspired by CSS.
- Performance and Native AOT support for compact applications that start quickly.
- MIT licence and a very active community.
When to choose it
Business and technical applications that must also run on Linux, industrial tools, interfaces on embedded panels, migrations of old WPF applications to more platforms. For apps designed mainly for phones, with a native look, .NET MAUI remains an alternative worth considering.
Comments (0)
No comments yet.