Avalonia.Controls.Markdown 12.4.0

Prefix Reserved
dotnet add package Avalonia.Controls.Markdown --version 12.4.0
                    
NuGet\Install-Package Avalonia.Controls.Markdown -Version 12.4.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="Avalonia.Controls.Markdown" Version="12.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Avalonia.Controls.Markdown" Version="12.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Avalonia.Controls.Markdown" />
                    
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 Avalonia.Controls.Markdown --version 12.4.0
                    
#r "nuget: Avalonia.Controls.Markdown, 12.4.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 Avalonia.Controls.Markdown@12.4.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=Avalonia.Controls.Markdown&version=12.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Avalonia.Controls.Markdown&version=12.4.0
                    
Install as a Cake Tool

Avalonia.Controls.Markdown

The Avalonia.Controls.Markdown package provides a Markdown rendering control for Avalonia applications. It enables you to display Markdown-formatted text with support for common Markdown features and styling.

Features

  • Render Markdown content
  • Styling support with named resources

Quick Start

Add the Avalonia.Controls.Markdown package to your Avalonia project.

XAML Usage

 <Markdown xml:space="preserve">
  # Markdown
  ## Headings
  ### Heading 3
  #### Heading 4
  ##### Heading 5
  ###### Heading 6

  **Bold Text**
  *Italic Text*
  ~~Strikethrough~~
  __Bold__ and _Italic_

  [Link to Avalonia](https://avaloniaui.net)

  `Inline code`

  - Unordered list item 1
  - Unordered list item 2
    - Nested item 2a
    - Nested item 2b
  ---
  1. Ordered list item 1
  2. Ordered list item 2
     1. Nested ordered 2a
     2. Nested ordered 2b
  ---  
  > Blockquote example
  >> Nested blockquote
  ---
  | Header 1 | Header 2 |
  |----------|----------|
  | Cell 1   | Cell 2   |
  | Cell 3   | Cell 4   |

  ![Sample Image](https://private-user-images.githubusercontent.com/552074/446176752-21950b56-cd28-4574-9a0a-73bb17b89d31.png)
 </Markdown>

C# Usage

var markdown = new Markdown
{
    Text = "# Hello, Markdown!"
};

Markdig extensions for the whole app

ConfigureMarkdown adds Markdig extensions to every Markdown control in the app. Each call adds to the earlier ones, so packages such as Avalonia.Controls.Markdown.Mermaid (UseMermaid()) combine with your own:

AppBuilder.Configure<App>()
    .UsePlatformDetect()
    .ConfigureMarkdown(options => options.Extensions.Add(new MyExtension()));

Documentation: https://docs.avaloniaui.net/controls/data-display/text-display/markdown

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

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Avalonia.Controls.Markdown:

Package Downloads
Avalonia.Controls.Markdown.TextMate

Optional TextMate-based syntax highlighting integration for Avalonia.Controls.Markdown

Avalonia.Controls.Markdown.Mermaid

Mermaid diagram rendering for Avalonia.Controls.Markdown, drawn natively without SVG

Avalonia.Controls.Markdown.ColorCode

Optional ColorCode-based syntax highlighting integration for Avalonia.Controls.Markdown

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.4.0 5,275 10/28/2026
12.3.1 21,579 10/8/2026
12.3.0 7,262 9/11/2026
12.2.3 2,458 8/20/2026
12.2.2 35,823 7/31/2026
12.2.1 509 7/29/2026
12.2.0 10,072 7/23/2026
12.1.5 9,121 6/29/2026
12.1.4 4,877 6/22/2026
12.1.3 640 6/9/2026
12.1.2 689 6/2/2026
12.1.1 1,141 5/14/2026
12.1.0 383 5/12/2026
12.0.0 8,950 4/7/2026
11.3.5 16,476 3/3/2026
11.3.4 4,669 12/4/2025
11.3.3 407 12/3/2025
11.3.2 738 11/24/2025
11.3.1 3,382 11/17/2025
Loading failed

## 12.4.0

### Features
- `Markdown.Extensions` takes Markdig extensions without subclassing the control: they are added to the parse pipeline after the supported ones, and changing the collection parses the text again. `ConfigurePipeline` still runs last.
- `AppBuilder.ConfigureMarkdown(options => ...)` adds Markdig extensions to every `Markdown` control in the app through the new `MarkdownOptions.Extensions`. The actions run during app setup, before any control exists, in the order they were registered and all on the same options, so packages that each add an extension combine. A control adds them after the supported extensions and before its own `Extensions`. `MarkdownSerializer` does not read them.
- `MarkdownSerializer` gains a constructor that takes Markdig extensions, `new MarkdownSerializer(options, codeHighlighter, extensions)`, and an `Extensions` property listing them. They affect reading only.
- `<a id="name"></a>` and `<a name="name"></a>` in text name their paragraph as a bookmark (`Block.Bookmarks`), so `[x](#name)` navigates to it; the tag stays raw and writes back unchanged. A bookmark from another format (a Word bookmark) is written as `<a id="name"></a>` at the start of its paragraph or heading.
- Links reach headings by their GitHub slug: `[Setup](#getting-started)` scrolls to `## Getting Started`, and repeated headings are told apart as `#intro`, `#intro-1`, `#intro-2`. The slug is computed from the heading's current text when the link is followed, so it follows every edit. The control's `RequestNavigate` handler navigates to a bookmark, a heading or a note by label and marks the request handled; a fragment that names none of them still bubbles to the application.