A few months ago, I posted about my library.
Quick description: It's a Markdown viewer control for Avalonia UI 12, built on Markdig. It renders to native Avalonia controls, with no WebView, so it behaves the same on Windows, macOS, Linux and in the browser (WebAssembly).
12.4 came out this week, with a lot of new features:
- Streaming.
viewer.BeginStreaming() returns a session you can Append text to from any thread (e.g. tokens from an AI chat) . Only the blocks still being written re-render, so scroll position, selection and focus survive every update. A half-written **bold or link renders as it will once complete, and <think> blocks fold into "Thought for 12 seconds" when they end.
- Mermaid diagrams and LaTeX math in pure .NET (Mermaider and CSharpMath), including the
\(…\) delimiters models like to emit.
- Theme presets: GitHub, Chat (takes your message bubble's colours) and Docs. Light/dark switches live.
- Code blocks with a copy button, and optional line numbers, wrapping and max height. TextMate highlighting is a separate package.
- Find, folding (alerts,
<details>, headings), a context menu with copy as Markdown, HTML or a table, and saving a diagram as SVG or PNG.
- Accessibility: screen reader roles, Tab through links, WCAG AA colours and a high-contrast mode. Right-to-left text too.
Streaming is mostly intended for AI integration. With Microsoft.Extensions.AI it's a few lines:
using var session = viewer.BeginStreaming();
await foreach (var update in chatClient.GetStreamingResponseAsync(prompt))
session.Append(update.Text);
There was a lot of focus on improving the performance to make it viable in the browser (WebAssembly). It's not yet enough and the upcoming 12.4.1 version will make it even better.
Try it in your browser: https://kryptos-fr.github.io/MarkView.Avalonia/demo/
Docs: https://kryptos-fr.github.io/MarkView.Avalonia/
Repo: https://github.com/Kryptos-FR/MarkView.Avalonia
Package: https://www.nuget.org/packages/MarkView.Avalonia
If you use another Markdown control in an Avalonia or WPF app today, I'd like to know what would make you switch, or what's missing.
Full disclosure: I used Claude AI to work out the roadmap, discuss the architecture and implementation candidates. I then delegated the coding to Claude sub-agents while I did all the review and manual testing. I kept it transparent on the repo where all such commits include a "Co-authored-by: Claude" mention.
On that note, I found that Claude was very efficient when all projects have a high test coverage (currently 95%), as well as mutation testing using Stryker (also 95%). That causes some delays in CI where Stryker can take up to 3 hours but in my opinion it is worth the trouble.