One thing that caught my eye was the MarkdownTextBlock XAML Control that does exactly what the name implies: You set the
Text-property with some Markdown text and it shows the rendered Markdown. You can change the styling of the output (font size, color, etc.) to match your application or a specific desired document style. And the
LinkClicked event tells you when a link has been clicked.
If you want to see it (and all the other toolkit features) in action, download the UWP Community Toolkit Sample App in the Windows Store.
How good is it?
If you’ve used Markdown in more than one application or website before, you’ll know that there are smaller and larger differences here and there (the website for CommonMark has more on that).
Playing around with the control to learn more, I found the following:
- The basic features (headings, bold, italic, bulleted lists) work as expected.
- Inline HTML is not supported (understandable when rendering Markdown outside a browser)
- Images are not supported – yet; they will be in version 1.4.
- Tables (which are not part of the original Markdown description, by the way) don’t work. Interesting that the Markdown text in the demo app contains a non-working sample for a table. This will be fixed in version 1.4.
- Another Markdown extension missing are (GFM style) fenced code blocks using triple backticks – they will be added in version 1.4, but don’t expect language-specific syntax highlighting.
While this list makes it sound like there are a lot of things that aren’t working (yet) or are missing, it is important to consider use cases for the control.
- Do you plan to display arbitrary Markdown like Readme.md files from GitHub?
- Or do your want a control to display explanation texts on a form (where you write all the markdown)?
If the latter is the case, the control most likely will do its job already in version 1.3, with the tables and images coming in version 1.4 being a welcome addition, of course.