Annotations, forms and redaction
Use the PdfViewer annotation tools in Avalonia, including text markup, drawing, shapes, sticky notes, stamps, links, redaction, form filling and undo/redo.
Use the PdfViewer annotation tools in Avalonia, including text markup, drawing, shapes, sticky notes, stamps, links, redaction, form filling and undo/redo.
Adds syntax highlighting to code blocks rendered by the Markdown control, with ColorCode and TextMate implementations available as separate packages.
This control is available as part of Avalonia Pro or higher.
Use FlowDocumentScrollViewer to display rich documents without editing. This guide covers setup, document loading, styling, layout, and common viewer patterns.
Learn how to programmatically expand and collapse rows in a hierarchical TreeDataGrid, respond to expand/collapse events, and implement lazy loading on demand.
The RichTextEditor is designed for extensibility at multiple levels. This guide covers patterns for extending functionality without modifying core code.
Learn how to filter rows in the Avalonia TreeDataGrid control using predicate functions, including multi-criteria, enum, null-safe, and hierarchical filtering patterns.
A footnote is two things that always travel together: a RichFootnoteReference anchor sitting in the text, and a Footnote body holding the note. The anchor shows a number, the body shows the same number beside its content, and the two are paired by NoteId. Neither stores the number, which is instead determined by the note's 1-based position among all of the document's notes. Every edit that moves, adds or deletes an anchor renumbers everything without touching a character of text.
A page header or footer here is a PageBand. It is a small document that the owning document holds and repeats on every sheet it serves. A band has a Role (header or footer) and a Rule saying which pages it claims; a Section can also name a band explicitly, so one band can serve any number of sections.
Customize how the Markdown control loads and resolves images by setting Markdown.ImageLoader to a MarkdownImageLoader.
This is a practical guide to implementing media playback in Avalonia applications using the Avalonia Pro MediaPlayer.
Load PDF documents into the Avalonia PdfViewer from a path, stream or byte array, handle passwords and permissions, and save edits in place or to a copy.
Render Markdown-formatted text using the Avalonia.Controls.Markdown control, built on the shared FlowDocument model with full DocumentNode styling, selection, streaming, and custom image loading.
MarkdownSerializer reads Markdown into a document and writes a document back out as Markdown, i.e., reports both CanRead and CanWrite as true and appears in a save-format list like any other serializer. It is found in the package Avalonia.Controls.Markdown, and uses the namespace Avalonia.Controls.Documents.Serialization.Markdown.
The Markdown control is built on the shared FlowDocument model, where every rendered element (Paragraph, Section, Table, RichSpan, RichHyperlink, etc.) is a full Avalonia StyledElement. This means you can style Markdown output using two complementary approaches:
The MediaPlayer class provides the core functionality for media playback in Avalonia applications. It handles media
The MediaPlayerControl is a fully-featured UI control for media playback that provides transport controls, progress display, volume control, and video rendering. It encapsulates a MediaPlayer instance and provides a rich user interface for media playback.
The MediaSource class hierarchy provides an abstraction for different types of media content sources in Avalonia Pro MediaControls. This allows the media playback system to handle various content sources (files, URLs, streams) through a unified interface.
Navigate pages, zoom, follow links and bookmarks, search text and extract page content or images with the Avalonia PdfViewer control.
Paginated output, the paged view of FlowDocumentPageViewer, the editor in DocumentViewMode.PageLayout and the PDF export display content by filling pages line by line and consulting the document for where a page may end. This guide covers how to control page layout: explicit page breaks, the three keep rules, and per-section page setup.
PdfSerializer writes a document as vector PDF 1.7. It is found in the package Avalonia.Controls.Documents.Serialization.Pdf, and uses the namespace Avalonia.Controls.Documents.Serialization.Pdf.
Display, search, annotate, fill and print PDF documents in Avalonia with the PdfViewer control from the Avalonia.Controls.PdfViewer package.
Performance tuning guide for RichTextEditor. Covers batch edits, event optimization, memory management, serialization, and profiling strategies.
Package targets, WebAssembly hosting, memory use on large documents, trimming, diagnostics and known limitations of the Avalonia PdfViewer control.
Print and share PDF documents from the Avalonia PdfViewer through the native print dialog and share sheet, or handle the request with your own pipeline.
Avalonia.Controls.RichTextEditor is a rich text editing solution for Avalonia applications, offering functionalities for interactive text editing, document architecture and file serialization.
Two selection modes are supported:
How to enable, disable, and customize column sorting in the Avalonia TreeDataGrid control.
Style the Avalonia PdfViewer with theme brushes, pseudo-classes and a custom template, translate its strings, and review its accessibility support.
The RichTextEditor architecture uses immutable snapshots for background-safe serialization while requiring UI thread access for live document operations. This guide explains the threading model and safe patterns.
By default, RichTextEditor includes a primary toolbar, a selection mini-bar, and a right-click context menu. Each of these toolbars is built from the same basic system and can be customized independently. You can swap layouts, add your own tools, fine-tune the overflow menu, re-theme buttons, and more. This guide takes you through your customization options, from most common to most advanced.
The TreeDataGrid combines tree view and data grid functionality in a single control, displaying hierarchical and tabular data together. It supports two modes:
This document describes the breaking changes between TreeDataGrid 11.x and 12.x and
The virtual keyboard component provides an on-screen keyboard for Avalonia applications. It is designed for touch-based or kiosk scenarios where physical keyboards may not be available, enabling text input through touchscreens or mouse clicks.
The VirtualKeyboard is a standalone control that provides an on-screen keyboard. This control can be manually placed in your application's layout. Unlike VirtualKeyboardScope, which automatically manages keyboard visibility based on focus, VirtualKeyboard is explicitly directed at a specific target input element.
A container control that automatically shows and hides the virtual keyboard based on input focus.