Avalonia.Controls.Markdown 12.4.1

Prefix Reserved
dotnet add package Avalonia.Controls.Markdown --version 12.4.1
                    
NuGet\Install-Package Avalonia.Controls.Markdown -Version 12.4.1
                    
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.1" />
                    
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.1" />
                    
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.1
                    
#r "nuget: Avalonia.Controls.Markdown, 12.4.1"
                    
#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.1
                    
#: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.1
                    
Install as a Cake Addin
#tool nuget:?package=Avalonia.Controls.Markdown&version=12.4.1
                    
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.1 219 11/5/2026
12.4.0 16,877 10/28/2026
12.3.1 22,038 10/8/2026
12.3.0 7,638 9/11/2026
12.2.3 2,461 8/20/2026
12.2.2 35,828 7/31/2026
12.2.1 514 7/29/2026
12.2.0 10,077 7/23/2026
12.1.5 9,141 6/29/2026
12.1.4 4,882 6/22/2026
12.1.3 644 6/9/2026
12.1.2 694 6/2/2026
12.1.1 1,146 5/14/2026
12.1.0 387 5/12/2026
12.0.0 9,524 4/7/2026
11.3.5 16,516 3/3/2026
11.3.4 4,672 12/4/2025
11.3.3 410 12/3/2025
11.3.2 742 11/24/2025
Loading failed

## 12.4.1

### Fixes
- A fenced or indented code block inside a list item or a block quote shows only its code. Every line after the first also carried the list item's indentation or the quote's `> ` markers, and a fence indented by up to three spaces kept that indentation on its following lines, because the block's text was read as one span of the source rather than the lines the parser trimmed.
- A code block whose first line is blank keeps its text instead of showing empty, and blank lines at the end of a fenced block are kept.
- A `[` or `![` that opens no link or image is kept as text. It disappeared, so `[link [bar](/uri)` read "link bar" and `see [note` read "see note".
- An HTML table split by blank lines keeps each part in its own HTML block. Markdown reads each part as a separate HTML block, and the cells of the later blocks were moved into a table after all of them, so the view showed them out of place and the written markdown repeated their text after the original HTML.

### Behavioural changes
- Lines in a code block are always separated by `\n`. A code block read from a source with CRLF line endings used to keep the `\r\n`.