The project
The plumbing a real Avalonia app needs
Avalonia is a cross-platform .NET UI framework — one XAML codebase for Windows, macOS, and Linux. It gives you the controls and the runtime, but leaves the application scaffolding to you: how you boot the app, wire dependencies, locate views, and theme the surface.
CCSWE.Avalonia fills that gap with three focused libraries. They lean on patterns .NET developers already know — the Generic Host, dependency injection, MVVM — so an Avalonia app starts from familiar ground instead of hand-written plumbing. Each library stands on its own; take one or take all three.
Built for Avalonia 12. Everything is MIT licensed and published on NuGet, and the major version tracks the Avalonia major it targets.
Library collection
Three libraries for Avalonia 12.
-
CCSWE.Avalonia.HostingBootstrap a desktop app on the .NET Generic Host — DI,
IHostedService/BackgroundServicelifecycle, configuration, and logging, without the hand-written host wiring.DesktopApplication.CreateBuilder<App>()carriesProgram.Main, and yourAppreceives the provider viaIServiceProviderAccessor. Ships as a lifetime-agnostic contract plus a.Desktophost package. -
CCSWE.Avalonia.ViewLocatorA compile-time, AOT- and trim-safe
ViewLocator. A Roslyn source generator pairs eachFooViewModelwith itsFooViewby naming convention — with a[View]override and an assembly-wide fallback — and resolves the view from yourIServiceProvider. No reflection, no hand-maintained type map;[GenerateViewLocator(typeof(ViewModelBase))]on a partial class is the whole locator. -
CCSWE.Avalonia.MaterialA standalone Material 3 theme — a Dark/Light color system, the M3 type scale, motion, embedded fonts, and control themes spanning the full surface: buttons, text fields, selection controls, lists, menus, tabs, sliders, progress, the date family, navigation drawer, and more. It depends only on Avalonia core and supplies the whole control surface itself — no
FluentThemebase required.
Seen in production
Real apps run on these.
Remote.Adb — the cross-platform adb-over-SSH tool — is built on all three:
hosted on CCSWE.Avalonia.Hosting, views resolved by CCSWE.Avalonia.ViewLocator, and
themed with CCSWE.Avalonia.Material. It's the clearest demonstration of the libraries working
together in a shipping application.
Browse the libraries on GitHub
All three libraries are MIT licensed and available on NuGet. Each repo includes a sample app and usage docs.
View on GitHub