Uno.XamlParser 0.10.0-dev.38

Prefix Reserved
This is a prerelease version of Uno.XamlParser.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Uno.XamlParser --version 0.10.0-dev.38
                    
NuGet\Install-Package Uno.XamlParser -Version 0.10.0-dev.38
                    
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="Uno.XamlParser" Version="0.10.0-dev.38" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Uno.XamlParser" Version="0.10.0-dev.38" />
                    
Directory.Packages.props
<PackageReference Include="Uno.XamlParser" />
                    
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 Uno.XamlParser --version 0.10.0-dev.38
                    
#r "nuget: Uno.XamlParser, 0.10.0-dev.38"
                    
#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 Uno.XamlParser@0.10.0-dev.38
                    
#: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=Uno.XamlParser&version=0.10.0-dev.38&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Uno.XamlParser&version=0.10.0-dev.38&prerelease
                    
Install as a Cake Tool

Uno.XamlParser

CI NuGet

Uno.XamlParser is a streaming XAML reader/writer pipeline for parsing, validating, and fixing XAML markup. It is designed to accept XAML as a stream and expose a visitor-based pipeline where each stage can observe, mutate, or filter the markup before it reaches the next stage.

Installation

dotnet add package Uno.XamlParser

High-Level Goals

  • Accept XAML as a stream (strings, PipeReader, ReadOnlySequence<char>, etc.).
  • Expose a visitor-based pipeline where each stage can observe, mutate, or filter the markup before it reaches the next stage.
  • Preserve a clear separation between syntax validation, semantic enrichment, and type resolution so tests can pin the behavior of each layer independently.

Pipeline Stages

Stage Purpose Typical Issues Caught
Stage 0 - Input & Tokenization Consume raw XML chunks, normalize whitespace, surface lexical tokens, and recover from malformed entities. Unterminated tags, malformed attributes, stray ampersands, invalid XML declaration.
Stage 1 - XAML Semantics Interpret tokens as XAML constructs (elements, attached properties, markup extensions) and apply structure-aware fixers. Missing namespace declarations, unsupported markup extension prefixes, WPF-only binding syntax.
Stage 2 - Type Resolution Map {prefix}:{Type} identifiers to IXamlType instances, resolve property names, and recursively resolve nested markup extensions. Unknown controls, invalid property casing, non-existent properties, namespace-type mismatches.
Stage 3 - Value Semantics Validate/normalize property values using resolved types (enums, markup extensions, Thickness, GridLength, CornerRadius, Binding/x:Bind, resources, etc.). Invalid enum values, unsupported unit suffixes, malformed markup extensions, missing resources.

Each stage has a reader (pulls/raises events), optional visitors (fixers/analyzers), and a writer (rebuilds XAML) so they can be composed as Reader → Visitors → Writer. If a consumer only needs diagnostics, it can omit the writer entirely.

Processing Policies

All stages respect IXamlProcessingPolicy, which decides whether a given fix/edit is applied or only reported as a diagnostic. Register a preset (see XamlProcessingPolicyPresets) or provide your own implementation via DI. See the Processing Policies spec for detailed guidance.

Specifications

Project Layout

  • src/Uno.XamlParser — Core streaming abstractions, token structs, readers/writers, and shared visitors/fixer interfaces.
  • src/Uno.XamlParser.Tests — MSTest project that exercises each stage via unit tests and golden files.

Building

dotnet build src/Uno.XamlParser.slnx
dotnet test src/Uno.XamlParser.slnx

License

See LICENSE.md.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.

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
0.10.0-dev.74 66,486 5/22/2026
0.10.0-dev.71 17,178 4/22/2026
0.10.0-dev.67 76 4/16/2026
0.10.0-dev.59 73 4/16/2026
0.10.0-dev.54 72 4/16/2026
0.10.0-dev.48 7,594 4/16/2026
0.10.0-dev.43 71 4/10/2026
0.10.0-dev.42 66 4/10/2026
0.10.0-dev.41 2,565 4/9/2026
0.10.0-dev.38 123 4/7/2026
0.10.0-dev.35 69 4/3/2026
0.10.0-dev.34 68 4/3/2026
0.10.0-dev.31 68 4/2/2026
0.10.0-dev.29 67 4/1/2026
0.10.0-dev.28 3,626 3/31/2026
0.10.0-dev.25 103 3/30/2026