Skip to content

0use-TE/Crystal.Avalonia

Repository files navigation

Crystal.Avalonia

A lightweight infrastructure layer for Avalonia UI applications with modular architecture and dependency injection.

NuGet AOT Compatible

What It Provides

  • 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)

What It's NOT

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

Quick Start

Install the Template

dotnet new install CrystalTemplate

Create a New Project

dotnet new CT -o MyApp
cd MyApp
dotnet run

Documentation

AOT & Trimming Support

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.

License

MIT License

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors