Avalonia.Controls.Documents
12.1.4
Prefix Reserved
dotnet add package Avalonia.Controls.Documents --version 12.1.4
NuGet\Install-Package Avalonia.Controls.Documents -Version 12.1.4
<PackageReference Include="Avalonia.Controls.Documents" Version="12.1.4" />
<PackageVersion Include="Avalonia.Controls.Documents" Version="12.1.4" />
<PackageReference Include="Avalonia.Controls.Documents" />
paket add Avalonia.Controls.Documents --version 12.1.4
#r "nuget: Avalonia.Controls.Documents, 12.1.4"
#:package Avalonia.Controls.Documents@12.1.4
#addin nuget:?package=Avalonia.Controls.Documents&version=12.1.4
#tool nuget:?package=Avalonia.Controls.Documents&version=12.1.4
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 | 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 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. |
-
net10.0
- Avalonia (>= 12.0.3)
- AvaloniaUI.Licensing (>= 3.0.8)
-
net8.0
- Avalonia (>= 12.0.3)
- AvaloniaUI.Licensing (>= 3.0.8)
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
Package Description |
|
|
Avalonia.Controls.Documents.Serialization.Rtf
Package Description |
|
|
Avalonia.Controls.RichTextEditor
Package Description |
|
|
Avalonia.Controls.Documents.Serialization.Xaml
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
## 12.1.4
### Fixes
- Modifying a displayed document's structure through a `RichTextElementCollection` (`Blocks`, `Inlines`, table rows/cells, list items) now updates the rendering immediately. Adding, inserting, removing, or clearing children of a live `FlowDocument` — including inside nested sections, and text-less blocks such as `BlockUIContainer` — previously changed the document model without notifying the render layer, so the display went stale (old blocks lingered, new blocks were missing) until the document was re-bound.
- Copying a selection that ends in a trailing empty paragraph — for example via Select-All — now preserves that empty paragraph when the content is pasted. The zero-length trailing paragraph was previously dropped, so copy/paste round-trips silently lost a document's final blank line. Range snapshots are now built by walking the document tree and capturing whole boundary blocks by node identity, rather than re-deriving blocks from start/end offsets, and `ContentEnd`/Select-All now reach a trailing empty block.
- Numbered (`TextMarkerStyle.Decimal`) list markers now render with the tabular-figures OpenType feature, so the digits line up into a clean column instead of staggering in fonts whose figures have proportional widths. Right-alignment already lined up the periods; this aligns the digits above them. Bullets and roman/latin markers are unaffected, and fonts without tabular figures fall back harmlessly to their default digits.