![]() |
VOOZH | about |
dotnet add package Markdown.Xaml --version 1.0.0
NuGet\Install-Package Markdown.Xaml -Version 1.0.0
<PackageReference Include="Markdown.Xaml" Version="1.0.0" />
<PackageVersion Include="Markdown.Xaml" Version="1.0.0" />Directory.Packages.props
<PackageReference Include="Markdown.Xaml" />Project file
paket add Markdown.Xaml --version 1.0.0
#r "nuget: Markdown.Xaml, 1.0.0"
#:package Markdown.Xaml@1.0.0
#addin nuget:?package=Markdown.Xaml&version=1.0.0Install as a Cake Addin
#tool nuget:?package=Markdown.Xaml&version=1.0.0Install as a Cake Tool
Markdown XAML is a port of the popular MarkdownSharp Markdown processor, but with one very significant difference: Instead of rendering to a string containing HTML, it renders to a FlowDocument suitable for embedding into a WPF window or usercontrol.
With HTML output, details of fonts and colours (and so on) are handled by CSS, but with a FlowDocument there's no direct equivalent. Instead of the HTML approch of linking a stylesheet to the rendered output, MarkDown.Xaml uses WPF styles that are linked to the rendering engine and applied to the output as it is generated. See the included demo application for an example of how this can be configured.
I wrote this to use in a WPF application where I was generating paragraphs of text for that described the output of a rules engine, and I wanted a richer display than just a column of plain text.
Potentially, I could have used MarkdownSharp and an embeded browser or other HTML renderer to achieve this (the route taken by MarkPad, but this didn't give me the fine control over appearance that I desired.
If the Markdown you are processing is going to end up translated to HTML, stick with MarkdownSharp or one of the other similar translators, so that your rendering is as accurate as possible. On the otherhand, if you are showing the Markdown within your WPF application and not passing it out to a browser elsewhere, Markdown XAML may be a great fit.
Since the output is not HTML, any embedded HTML is going to end up displayed as raw code. This also means that there's no way to bypass (or tunnel through) the Markdown engine to achieve anything not supported by Markdown directly. Depending on your context this may or may not be a significant issue.
The core of the Markdown render is complete, as is support for basic styling. The structure of the MarkdownSharp codebase has been retained to aid maintenance - if there are any regular expression fixes there, they should be easy to patch in here.
There are a number of Markdown extensions that could be supported, though since MarkdownSharp targets only the core, this would necessitate a departure from keeping the codebase as similar as possible.
Markdown XAML is licensed under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net45 net45 is compatible. net451 net451 was computed. net452 net452 was computed. net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
This package has no dependencies.
Showing the top 1 NuGet packages that depend on Markdown.Xaml:
| Package | Downloads |
|---|---|
|
Zafiro.Wpf
La crema for WPF |
Showing the top 2 popular GitHub repositories that depend on Markdown.Xaml:
| Repository | Stars |
|---|---|
|
WOA-Project/WoA-Installer-Rpi
This repository was deprecated, use:
|
|
|
TorchAPI/Torch
An extensible modding framework and improved client/DS for Space Engineers. Still a work in progress!
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 52,628 | 7/26/2018 |
Initial release