gitmyhub

Avalonia

C# ★ 31k updated 1d ago

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The future of .NET UI

A C# framework for building desktop, mobile, and web apps that run on Windows, macOS, Linux, iOS, Android, and browsers from a single codebase.

C#.NETXAMLNuGetsetup: moderatecomplexity 3/5

Avalonia is a framework for building desktop, mobile, and browser applications using C# and XAML. XAML is a markup language (similar to XML or HTML) that describes how user interface elements are laid out and styled. The framework solves a long-standing problem for C# developers: Microsoft's built-in UI toolkit for Windows, called WPF, only runs on Windows. Avalonia takes that familiar development model and extends it to macOS, Linux, iOS, Android, and WebAssembly — so a developer can write one codebase and have the application run natively on all of those platforms.

Avalonia works by rendering its own controls directly, meaning it does not rely on each operating system's built-in UI widgets. This gives it a consistent look across platforms and lets developers define styles and themes in a way that behaves predictably everywhere. Developers describe their UI in XAML files, write logic in C#, and connect the two through a pattern called data binding — where the interface automatically reflects changes in the underlying data without the developer writing repetitive update code.

A developer would use Avalonia when they want to build a rich desktop application (with real windows, menus, and complex layouts) that must run on more than just Windows, or when porting an existing WPF application to other operating systems. A companion commercial product called Avalonia XPF is specifically aimed at running existing WPF apps on macOS and Linux with minimal code changes. The project is distributed as a NuGet package — the standard package manager for .NET — and has tooling integrations for Visual Studio Code, Visual Studio, and JetBrains Rider.

Where it fits