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
<PackageReference Include="Avalonia.Controls.Markdown" Version="12.4.0" />
<PackageVersion Include="Avalonia.Controls.Markdown" Version="12.4.0" />
<PackageReference Include="Avalonia.Controls.Markdown" />
paket add Avalonia.Controls.Markdown --version 12.4.0
#r "nuget: Avalonia.Controls.Markdown, 12.4.0"
#:package Avalonia.Controls.Markdown@12.4.0
#addin nuget:?package=Avalonia.Controls.Markdown&version=12.4.0
#tool nuget:?package=Avalonia.Controls.Markdown&version=12.4.0
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 |

</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 | Versions 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. |
-
net10.0
- Avalonia (>= 12.0.3)
- Avalonia.Controls.Documents (>= 12.4.0)
- Avalonia.Controls.Documents.Serialization.Html (>= 12.4.0)
- AvaloniaUI.Licensing (>= 3.1.2)
- Markdig.Signed (>= 1.0.0)
-
net8.0
- Avalonia (>= 12.0.3)
- Avalonia.Controls.Documents (>= 12.4.0)
- Avalonia.Controls.Documents.Serialization.Html (>= 12.4.0)
- AvaloniaUI.Licensing (>= 3.1.2)
- Markdig.Signed (>= 1.0.0)
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.ColorCode
Optional ColorCode-based syntax highlighting integration for Avalonia.Controls.Markdown |
|
|
Avalonia.Controls.Markdown.Mermaid
Mermaid diagram rendering for Avalonia.Controls.Markdown, drawn natively without SVG |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 12.4.0 | 3,706 | 10/28/2026 |
| 12.3.1 | 21,447 | 10/8/2026 |
| 12.3.0 | 7,231 | 9/11/2026 |
| 12.2.3 | 2,457 | 8/20/2026 |
| 12.2.2 | 35,820 | 7/31/2026 |
| 12.2.1 | 508 | 7/29/2026 |
| 12.2.0 | 10,070 | 7/23/2026 |
| 12.1.5 | 9,115 | 6/29/2026 |
| 12.1.4 | 4,873 | 6/22/2026 |
| 12.1.3 | 639 | 6/9/2026 |
| 12.1.2 | 687 | 6/2/2026 |
| 12.1.1 | 1,140 | 5/14/2026 |
| 12.1.0 | 382 | 5/12/2026 |
| 12.0.0 | 8,853 | 4/7/2026 |
| 11.3.5 | 16,438 | 3/3/2026 |
| 11.3.4 | 4,662 | 12/4/2025 |
| 11.3.3 | 405 | 12/3/2025 |
| 11.3.2 | 737 | 11/24/2025 |
| 11.3.1 | 3,382 | 11/17/2025 |
## 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.