Semantic expressions inside markup

Typed Bindings & Inline C#

Let markup express typed application logic without falling back to opaque runtime reflection.

Explore source
Parent systemXamlToCSharpGenerator
StatusActive
Modules2
RepositoryXamlToCSharpGenerator/XamlToCSharpGenerator.ExpressionSemantics

Compiled binding, x:Bind, C# expressions, interpolation, inline code blocks, event lambdas, bind-back, and dependency analysis share Roslyn-backed semantics.

  1. 01

    Typed x:Bind with bind-back

  2. 02

    C# expression and interpolation forms

  3. 03

    Inline event handlers and code blocks

  4. 04

    Roslyn dependency and type analysis

From intent
to working system.

01

Extract

Markup extensions and code blocks preserve expression source.

02

Analyze

Roslyn resolves types, members, dependencies, conversions, and diagnostics.

03

Generate

Typed getters, setters, handlers, and lifecycle helpers join emitted code.

04

Update

Dependency paths drive efficient binding refresh and bind-back.

Adopt this
capability.

Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.

01 · Install
Terminal
dotnet add package XamlToCSharpGenerator
02 · Use · xml
MainWindow.axaml
<TextBlock Text="{x:Bind ViewModel.DisplayName}" />
<Button Click="{CSharp Code=ViewModel.Save()}" Content="Save" />
<TextBlock>
<CSharp><![CDATA[$"{ViewModel.Count:N0} items"]]></CSharp>
</TextBlock>

Use one layer.
Compose the rest.

Read the module beside the complete system.

The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.

XamlToCSharpGenerator

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…