CompiledBindings.Avalonia
1.0.19.11-preview.1
dotnet add package CompiledBindings.Avalonia --version 1.0.19.11-preview.1
NuGet\Install-Package CompiledBindings.Avalonia -Version 1.0.19.11-preview.1
<PackageReference Include="CompiledBindings.Avalonia" Version="1.0.19.11-preview.1" />
<PackageVersion Include="CompiledBindings.Avalonia" Version="1.0.19.11-preview.1" />
<PackageReference Include="CompiledBindings.Avalonia" />
paket add CompiledBindings.Avalonia --version 1.0.19.11-preview.1
#r "nuget: CompiledBindings.Avalonia, 1.0.19.11-preview.1"
#:package CompiledBindings.Avalonia@1.0.19.11-preview.1
#addin nuget:?package=CompiledBindings.Avalonia&version=1.0.19.11-preview.1&prerelease
#tool nuget:?package=CompiledBindings.Avalonia&version=1.0.19.11-preview.1&prerelease
CompiledBindings for Avalonia
The Avalonia adapter follows the same architecture as the original WPF, Xamarin, MAUI, UWP, and WinUI implementations. It reuses CompiledBindings.Core; it does not wrap Avalonia's native CompiledBinding and does not replace the Avalonia AXAML compiler.
Build pipeline
CompiledBindings.Avalonia.targetsreads@(AvaloniaXaml)beforeCoreCompile.AvaloniaGenerateCodeTaskparsesx:Bindandx:Setwith the shared parser.- The task emits
.g.m.csfiles and an intermediate AXAML file without generator-only attributes. - Roslyn and Avalonia compile their normal inputs.
- The shared
ProcessAssemblyTaskinjectsInitializeAfterConstructorinto generated views.
Usage
<Window
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mx="http://compiledbindings.com/x"
xmlns:viewModels="using:MyApp.ViewModels"
x:Class="MyApp.MainWindow"
mx:DataType="viewModels:MainViewModel">
<StackPanel>
<TextBlock Text="{x:Bind Greeting}" />
<TextBox Text="{x:Bind Name, Mode=TwoWay}" />
<TextBlock Text="{x:Set SampleTitle}" />
</StackPanel>
</Window>
The adapter supports the shared expression parser, INotifyPropertyChanged, Avalonia properties, generated namescopes, OneTime, OneWay, OneWayToSource, TwoWay, event bindings, converters, fallback values, target-null values, and x:Set expressions.
Validation
AvaloniaTestis an executable desktop sample using AXAML bindings.CompiledBindings.Avalonia.Testscompiles AXAML through the complete build pipeline and exercises generated bindings with Avalonia Headless.- GitHub Actions builds the sample and runs the tests on every pull request.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Avalonia (>= 12.1.0 && < 13.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.19.11-preview.1 | 71 | 7/24/2026 |