Avalonia.Controls.Documents 12.1.3

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

Avalonia.Controls.Documents

Core document model library for Avalonia rich text controls. Provides rope-based text storage, a hierarchical document tree, text pointers, undo/redo, and snapshotting.

Features

  • Rope-based text storage (RopeTextStore) with O(log n) insert and delete
  • Document tree model (TextDocument, TextDocumentNode) for structural editing
  • Text pointer API (TextPointer, TextRange) with generation-based invalidation
  • Undo/Redo (UndoManager) with structural snapshot support
  • FlowDocument model with blocks (paragraphs, lists, tables, sections) and inlines
  • Document snapshots for thread-safe background serialization

Quick Start

var document = new FlowDocument();
var paragraph = new Paragraph();
paragraph.Inlines.Add(new Run("Hello, world!"));
document.Blocks.Add(paragraph);

Documentation

See the documentation for more details.

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 is compatible.  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 (6)

Showing the top 5 NuGet packages that depend on Avalonia.Controls.Documents:

Package Downloads
Avalonia.Controls.Markdown

Markdown rendering control for Avalonia applications

Avalonia.Controls.Documents.Serialization.Html

HTML serializer for Avalonia.Controls.Documents

Avalonia.Controls.Documents.Serialization.Rtf

RTF serializer for Avalonia.Controls.Documents with high-fidelity import and export support

Avalonia.Controls.RichTextEditor

Interactive rich text editor control for Avalonia with selection, formatting, and undo/redo support

Avalonia.Controls.Documents.Serialization.Xaml

XAML serializer for Avalonia.Controls.Documents

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.1.5 3,060 6/29/2026
12.1.4 2,293 6/22/2026
12.1.3 737 6/9/2026
12.1.2 778 6/2/2026
12.1.1 1,171 5/14/2026
12.1.0 538 5/12/2026

## 12.1.3

### Fixes
- List markers now align consistently across fonts: the marker column width, right-alignment, and the gap to the list text are measured from each marker's ink (glyph) edge rather than its advance width.
- Pasting onto an empty line no longer strands the original blank line above the pasted content.
- Editing a block container's `Blocks` collection on an attached document is now reliable: `Section.Blocks.Clear()` no longer throws, and `Remove`/`RemoveAt`/`Clear` no longer cascade-remove a container they leave empty — automatic removal of empty containers is reserved for text-editing operations. Empty table rows, row groups, and tables produced this way are handled gracefully by the model and serializers.