Table of Contents

Namespace Crystal.Avalonia

Classes

CrystalApplication

The base application class, extending Avalonia's Avalonia.Application. Provides the foundation for modular development and MVVM binding.

CrystalOptions

Configuration options for the Crystal.Avalonia framework. Registered as a singleton in DI and available via Options. Configure by overriding ConfigureOptions(CrystalOptions).

EventBinding

One event → command mapping used by EventToCommand.

EventBindingCollection

Collection of EventBinding for BindingsProperty.

EventToCommand

Lightweight attached properties that bridge View events to ViewModel ICommands. Mapped into the default Avalonia XML namespace via XmlnsDefinition — no xmlns prefix required.

ModuleManager

Manages and initializes application modules. Automatically created and used by the framework during OnFrameworkInitializationCompleted().

MvvmManager

Holds View-to-ViewModel mappings and the application IServiceProvider for a single CrystalApplication instance.

MvvmServiceCollectionExtensions

Extension methods for registering View/ViewModel pairs on IServiceCollection.

ViewModelLocator

Provides automatic ViewModel binding via an attached property. Independent of EnableViewLocator on the app options instance, which only gates ViewModel-first view location.

Interfaces

ILifecycleAware

Defines lifecycle hooks for ViewModel initialization and cleanup when used with ViewModelLocator or ViewLocator.

IModule

Defines an application module, which is a self-contained unit of functionality. Modules allow you to organize your application into independent feature areas, each managing its own services and views.

IModuleRegistrar

Provides module registration functionality. Used to register all functional modules during application startup.