Skip to content

FlowDocument class

Defined in

Namespace: CrissCross.Avalonia.UI.Controls Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Controls.FlowDocument Modifiers: public sealed

Summary

Lightweight representation of a flow document that mirrors the segments produced by RichTextDocument.

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Constructors

NameSummary
.ctorInitializes a new instance of the [FlowDocument](# class with a fresh [RichTextDocument](#

Properties

NameSummary
BlocksGets the block collection that represents the current layout.
SegmentsGets the parsed segments for the current document.
LengthGets the number of characters in the rendered document text.
ContentStartGets a pointer to the start of the document.
ContentEndGets a pointer to the end of the document.

Methods

NameSummary
SetTextReplaces the document content.
AppendTextAppends text to the end of the document.
InsertInserts text at the specified offset.
DeleteDeletes a text range.
ReplaceReplaces a text range with new text.
ToggleFormattingToggles formatting for a specific range.
ClearFormattingRemoves all formatting, keeping only the textual content.
GetTextGets the underlying markup/plain text.
GetPlainTextGets the rendered plain text for the document.
GetHtmlRangeGets the source HTML fragment for a rendered document range.
GetTextPointerCreates a pointer at the specified offset.
GetTextRangeGets the text within a pointer range.
GetRangeGets numeric range information represented by two pointers.
RefreshRebuilds the block representation from the underlying document.

Events

NameSummary
TextChangedRaised whenever the underlying content changes.
Inherited members