Avalonia.Controls.Documents
12.2.2
Prefix Reserved
dotnet add package Avalonia.Controls.Documents --version 12.2.2
NuGet\Install-Package Avalonia.Controls.Documents -Version 12.2.2
<PackageReference Include="Avalonia.Controls.Documents" Version="12.2.2" />
<PackageVersion Include="Avalonia.Controls.Documents" Version="12.2.2" />
<PackageReference Include="Avalonia.Controls.Documents" />
paket add Avalonia.Controls.Documents --version 12.2.2
#r "nuget: Avalonia.Controls.Documents, 12.2.2"
#:package Avalonia.Controls.Documents@12.2.2
#addin nuget:?package=Avalonia.Controls.Documents&version=12.2.2
#tool nuget:?package=Avalonia.Controls.Documents&version=12.2.2
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.1.1)
- SixLabors.ImageSharp (>= 4.0.0)
-
net8.0
- Avalonia (>= 12.0.3)
- AvaloniaUI.Licensing (>= 3.1.1)
- SixLabors.ImageSharp (>= 4.0.0)
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.Docx
DOCX serializer for Avalonia.Controls.Documents based on Open XML |
GitHub repositories
This package is not used by any popular GitHub repositories.
## 12.2.2
### Fixes
- A text view whose host measures it with an infinite height — a vertical `StackPanel`, a `ScrollViewer`'s content, an `ItemsControl` panel — no longer scrolls its fully visible content out of the control. Sizing to content realizes every block and returns the full content height, but the view still reported a zero logical viewport against the full extent, so the template `ScrollViewer` of `Markdown`, `RichTextEditor`, and `FlowDocumentScrollViewer` considered the whole content scrollable: it showed a phantom auto-hiding scrollbar, captured wheel input instead of letting it reach the surrounding scroll viewer, and a single wheel tick shifted the content permanently out of view, leaving the control blank. Any finite constraint (a Grid cell, a `DockPanel` fill, a finite `MaxHeight`) masked the problem, which is why the failure tracked the hosting panel. The view now publishes a viewport equal to its extent on each unbounded axis — including the empty-document case — so nothing is scrollable: scrollbars stay hidden, wheel input bubbles to the outer scroller, and the scroll offset stays pinned at zero. Scroll intent recorded while sizing to content is discarded instead of replaying as a jump when the host later provides a bounded viewport.