RichTextViewer.Avalonia 1.0.0

dotnet add package RichTextViewer.Avalonia --version 1.0.0
                    
NuGet\Install-Package RichTextViewer.Avalonia -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RichTextViewer.Avalonia" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RichTextViewer.Avalonia" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RichTextViewer.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RichTextViewer.Avalonia --version 1.0.0
                    
#r "nuget: RichTextViewer.Avalonia, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RichTextViewer.Avalonia@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RichTextViewer.Avalonia&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RichTextViewer.Avalonia&version=1.0.0
                    
Install as a Cake Tool

RichTextViewer.Avalonia

A read-only rich text viewer control for Avalonia applications that enhances plain text with clickable hyperlinks, limited inline Markdown formatting, quote styling, and find-and-highlight — without the overhead of a full HTML or Markdown renderer.

Screenshot

The control displaying quoted text at multiple depths, inline Markdown formatting, and highlighted find matches.

Features

  • Inline Markdown detection — bold (**text**), italic (*text* / _text_), bold-italic (***text***), strikethrough (~~text~~), and inline code (`code`).
  • Clickable hyperlinks — HTTP, HTTPS, FTP, and mailto: links detected automatically; scheme allowlist and blocklist enforced at both detection time and click time.
  • Multi-level quote styling — lines prefixed with > are coloured and indented by quote depth, up to three levels; configurable depth colours via Avalonia resource keys.
  • Extended quote detection — initials-style markers (AG>, pF>>), dash-prefix markers (->, ->>), empty quote line collapsing, and decorative-divider detection.
  • Find and highlight — case-insensitive search with a 150ms debounce; matches highlighted with configurable brush colours.
  • Preformatted line support — lines beginning with a single leading space can be rendered in a monospace font (Gopher convention).
  • Custom span detectors — plug-in ISpanDetector implementations to detect domain-specific syntax not handled by the built-in pipeline.
  • Custom span renderers — plug-in ISpanRenderer implementations to apply custom styling to any SpanType.
  • Theming via Avalonia resource keys — override any of the six named brush resources from the host application's resource dictionary.
  • Word-wrap toggle — switch between wrapping and horizontal scrolling at runtime.

Installation

dotnet add package RichTextViewer.Avalonia

Minimal Usage

Add the control to a window or user control:

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:rtv="clr-namespace:RichTextViewer.Avalonia.Controls;assembly=RichTextViewer.Avalonia"
        x:Class="MyApp.MainWindow">

  <rtv:RichTextViewer Text="Hello, **world**! Visit https://avaloniaui.net" />

</Window>

The control embeds its own default styles and works without any additional setup in App.axaml. If you want to override the library's named brush resources (such as RichTextViewer.QuoteDepth1Brush), see https://github.com/57951/RichTextViewer.Avalonia/blob/main/docs/theming.md for the required StyleInclude entry.

Equivalent C# code-behind:

RichTextViewer viewer = new RichTextViewer
{
  Text = "Hello, **world**! Visit https://avaloniaui.net"
};

Documentation

License

RichTextViewer.Avalonia is released under the GNU Affero General Public License v3.0.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 67 2/28/2026

Initial release.