Primitives Namespace
Namespace Avalonia.Controls.Documents.Primitives
Types
- CaretElement - Renders the text caret (insertion point) in the editor. Blinks at 500ms intervals and hides when selection is non-empty.
- EditorContextMenu - A Avalonia.Controls.MenuFlyout used as the right-click context menu for the editor.
- EditorSelectionFlyout - Selection flyout that hosts a unified toolbar for the editor mini-bar.
- IInteractiveTextHost - Host interface for interactive text views that support selection, navigation, and modular components — but not necessarily editing.
- ITextEditorHost - Host interface for text editor controls that support text mutation.
- ITextLine - Represents a single visual line of formatted text.
- ITextView - Provides coordinate mapping and hit testing for document content. Bridges between the document model (TextPointer) and visual representation (coordinates).
- ITextViewHost - Represents the host container for a text view, providing viewport and scrolling capabilities.
- InteractiveTextView - A Avalonia.Controls.Documents.Primitives.TextViewBase with caret, adorner layer, and highlight support.
Used by read-only interactive views such as
Markdown. Editor-specific extensions live in theEditorTextViewsubclass. - PageContext - The page a band host presents: the one-based page number and the page count. Set on a host by the paged view and inherited by the views inside it, so page-number fields resolve per page.
- PagedTextView - A text view that lays the document out as discrete pages (Word's print layout): blocks fill page bands until the page content height is reached or a page break forces a new page, page sheets render behind the content, and the placement seams of Avalonia.Controls.Documents.Primitives.TextViewBase are answered from a break table so the anchored virtualization, extent, and scrollbar projections work unchanged.
- TextLineInfo - A lightweight struct representing line information for caret positioning and navigation. Implements Avalonia.Controls.Documents.Primitives.ITextLine as a value type to avoid allocations.
- TextViewBase - A virtualizing text view that only realizes document blocks overlapping the viewport. Implements Avalonia.Controls.Documents.Primitives.ITextView for coordinate mapping and Avalonia.Controls.Primitives.ILogicalScrollable to drive a parent Avalonia.Controls.ScrollViewer.
- VirtualizingContentHost - A lightweight Avalonia.Controls.Control whose children are measured and arranged externally by Avalonia.Controls.Documents.Primitives.TextViewBase. Its own Avalonia.Controls.Documents.Primitives.VirtualizingContentHost.MeasureOverride(Avalonia.Size)/Avalonia.Controls.Documents.Primitives.VirtualizingContentHost.ArrangeOverride(Avalonia.Size) are intentional no-ops so the template layout engine does not interfere with the virtualizing measure/arrange pass driven by Avalonia.Controls.Documents.Primitives.TextViewBase.