All projects

Source-generated XAML stack

XamlToCSharpGenerator

Make XAML compilation, semantics, editing, preview, and automation one coherent source-generated system.

StatusActive
TierMaintained
DomainTools
Repositorywieslawsoltes/XamlToCSharpGenerator

An Avalonia XAML compiler stack with typed bindings, runtime loading, hot reload and design, language services, editor controls, LSP, MCP, preview, and VS Code tooling.

XamlToCSharpGenerator is a complete source-generated XAML platform rather than a single emitter. Compiler, runtime, semantic tooling, preview, hot reload, hot design, LSP, MCP, editor, and VS Code layers share the same view of Avalonia markup and inline C#.

01

Source-generated Avalonia XAML

02

x:Bind and inline C# semantics

03

VS Code, LSP, editor, and preview

04

Hot reload, hot design, and MCP hosts

Where it fits.

  • Avalonia application and framework authors
  • IDE, editor, and language-tool developers
  • Teams building agent-driven XAML workflows
Avalonia

SourceGen backend

x:Bind / compiled binding

Typed semantics

Hot reload / design

Integrated

VS Code / LSP / MCP

Shipped

Real output,
not a mockup.

AXSG XAML language and preview tooling
The AXSG workspace combines source-generated XAML, diagnostics, navigation, inline C# semantics, and live preview.

Clear layers.
Replaceable seams.

01

Compiler

Framework-neutral parsing and semantics feed Avalonia binding and C# emission.

02

Runtime

URI registries, loaders, hot reload, and migration weaving connect generated views to applications.

03

Language tools

One semantic engine powers VS Code, LSP, preview, and an embeddable Avalonia editor.

04

Live protocol

Workspace, runtime, and preview MCP hosts expose structured authoring and design state.

18+ packagescompiler-to-tooling stack
3 MCP modesworkspace, runtime, preview
1 engineshared XAML semantics
LiveGitHub metadata

One repository.
Multiple serious systems.

Explore the focused capabilities, their package boundaries, architecture, installation, and smallest useful example.

From package
to first frame.

Choose the package workflow used by your repository, then start from the smallest working example. Replace VERSION with the current stable or prerelease version shown on NuGet.

01 · Install
Terminal
dotnet add package XamlToCSharpGenerator
02 · Use · csharp
QuickStart.cs
AppBuilder.Configure<App>()
.UsePlatformDetect()
.UseAvaloniaSourceGeneratedXaml();

Start focused.
Compose as needed.

The repository is the source of truth.

Use the current documentation and samples, inspect changes, report issues, or support continued open-source maintenance.

PrintingTools

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…