CompiledBindings.Avalonia 1.0.19.11-preview.1

This is a prerelease version of CompiledBindings.Avalonia.
dotnet add package CompiledBindings.Avalonia --version 1.0.19.11-preview.1
                    
NuGet\Install-Package CompiledBindings.Avalonia -Version 1.0.19.11-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CompiledBindings.Avalonia" Version="1.0.19.11-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CompiledBindings.Avalonia" Version="1.0.19.11-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="CompiledBindings.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CompiledBindings.Avalonia --version 1.0.19.11-preview.1
                    
#r "nuget: CompiledBindings.Avalonia, 1.0.19.11-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CompiledBindings.Avalonia@1.0.19.11-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CompiledBindings.Avalonia&version=1.0.19.11-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CompiledBindings.Avalonia&version=1.0.19.11-preview.1&prerelease
                    
Install as a Cake Tool

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

  1. CompiledBindings.Avalonia.targets reads @(AvaloniaXaml) before CoreCompile.
  2. AvaloniaGenerateCodeTask parses x:Bind and x:Set with the shared parser.
  3. The task emits .g.m.cs files and an intermediate AXAML file without generator-only attributes.
  4. Roslyn and Avalonia compile their normal inputs.
  5. The shared ProcessAssemblyTask injects InitializeAfterConstructor into 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

  • AvaloniaTest is an executable desktop sample using AXAML bindings.
  • CompiledBindings.Avalonia.Tests compiles 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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