A lightweight infrastructure layer for Avalonia UI applications with modular architecture and dependency injection.
- Module System - Organize code into independent, self-contained modules
- Dependency Injection - Built-in support via Microsoft.Extensions.DependencyInjection
- View/ViewModel Wiring - Simple registration with automatic DataContext injection
- AOT Friendly - Full trimming and AOT compilation support
- Cross-Platform - Works with all Avalonia-supported platforms (Windows, macOS, Linux, Android, iOS, WebAssembly)
Crystal.Avalonia is not an MVVM framework. It does not provide ViewModel base classes or commands. You can use any MVVM library:
- CommunityToolkit.Mvvm
- Prism
- ReactiveUI
- Any other
dotnet new install CrystalTemplatedotnet new CT -o MyApp
cd MyApp
dotnet run- Introduction - Overview of Crystal.Avalonia
- Getting Started - Step-by-step tutorial
- API Documentation - Generated API reference
Crystal.Avalonia is fully compatible with .NET trimming and AOT compilation:
IsAotCompatible=true- The library is annotated for AOT compatibility- Properly annotated
[DynamicallyAccessedMembers]for reflection-heavy operations - No dynamic assembly scanning or runtime type discovery
See AOT Compatibility for more details.
MIT License