I recently needed, for a side project, a way to display styled text - text blocks with word-wrapping, bold, lists and hyperlinks - in a WPF application.

The display text isn’t static, but is going to be generated by code and/or loaded from files, so I needed a solution that was quite flexible in how it worked.

Markdown seemed like a good choice - easy to write and to generate, if only there was a good way to display the formatted results. I found a number of heavyweight solutions but they all seemed like overkill for my simple needs.

My solution? A port of MarkdownSharp that renders to a XAML FlowDocument instead of a string containing HTML.

The resulting code: Markdown.XAML is now available on Github.

Next Post
Code Analysis vs Code Contracts  16 Feb 2013
Prior Post
Care about the User Experience  21 Jan 2013
Related Posts
Greening the desert  07 Nov 2026
Makefile Breadcrumbs  29 Oct 2026
Superpowers for your AI  29 Mar 2026
Autotitling Windows Terminal Tabs  17 Mar 2026
Don't assume shared understanding  25 Jan 2026
Better Table Tests in Go  21 Oct 2025
Error assertions  26 Apr 2025
Browsers and WSL  31 Mar 2024
Factory methods and functions  05 Mar 2023
Using Constructors  27 Feb 2023
Archives
January 2013
2013