MarkdownBox 1.2.0
dotnet add package MarkdownBox --version 1.2.0
NuGet\Install-Package MarkdownBox -Version 1.2.0
<PackageReference Include="MarkdownBox" Version="1.2.0" />
<PackageVersion Include="MarkdownBox" Version="1.2.0" />
<PackageReference Include="MarkdownBox" />
paket add MarkdownBox --version 1.2.0
#r "nuget: MarkdownBox, 1.2.0"
#:package MarkdownBox@1.2.0
#addin nuget:?package=MarkdownBox&version=1.2.0
#tool nuget:?package=MarkdownBox&version=1.2.0
MarkdownBox
Markdown-rendering WinForms controls for .NET 4.7.1, powered by Markdig and the built-in WebBrowser (MSHTML) control.
Solution Structure
MarkdownBox.sln
├── MarkdownBox/ ← Class library
│ ├── Controls/MarkdownView.cs ← Embeddable UserControl
│ ├── Dialogs/MarkdownDialog.cs ← Resizable Form
│ ├── Dialogs/MarkdownBox.cs ← Static Show() helper
│ └── Helpers/BrowserEmulation.cs ← IE11 compat registry helper
│
└── MarkdownBox.Samples/ ← WinForms demo app
├── Samples/BasicSample.cs ← Feature showcase
├── Samples/LiveEditorSample.cs ← Split-pane live editor
├── Samples/HtmlSample.cs ← Raw HTML passthrough
└── Samples/DialogSample.cs ← All dialog variants
Setup
1. Install NuGet package (in both projects if referencing the library source):
Install-Package Markdig
2. Call BrowserEmulation.Apply() once at startup — this sets the IE11 rendering registry key for your exe:
[STAThread]
static void Main()
{
BrowserEmulation.Apply();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
Usage
Embed MarkdownView in a Form
var view = new MarkdownView { Dock = DockStyle.Fill };
this.Controls.Add(view);
view.SetContent("## Hello\n**bold**, `code`, <u>html</u>");
// Update anytime
view.SetContent(newMarkdown);
// Clear
view.Clear();
Modal dialog — MarkdownBox.Show()
// Simplest
MarkdownBox.Show("## Done\nOperation completed **successfully**.");
// With title
MarkdownBox.Show("## Warning\nAre you sure?", "Confirm");
// With buttons
var result = MarkdownBox.Show(
"## Delete\nThis will **permanently** delete the file.",
"Confirm Delete",
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning
);
if (result == DialogResult.Yes) { /* proceed */ }
// With owner + custom size
MarkdownBox.Show(markdown, "Details", MessageBoxButtons.OK,
MessageBoxIcon.Information, this, new Size(800, 500));
Supported Markdown
- Bold, italic, strikethrough, highlight (
==text==), superscript, subscript - Headings H1–H6
- Inline code and fenced code blocks
- Blockquotes
- Ordered / unordered lists, nested lists
- Task lists (
- [x]) - Tables (GFM)
- Horizontal rules
- Footnotes
- Images and hyperlinks (external links open in default browser)
- Emoji
:smile:→ 😄 - Raw HTML passthrough
<details>/<summary>accordions
Notes
WebBrowseruses MSHTML (IE engine).BrowserEmulation.Apply()forces IE11 mode — call it beforeApplication.Run().- External links are intercepted and opened in the default browser; the control itself does not navigate away.
- Right-click context menu and drag-drop are disabled on
MarkdownViewby default.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.1
- Markdig (>= 1.2.0)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
- System.Numerics.Vectors (>= 4.6.1)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release of MarkdownBox featuring modern SVG MDIcon header banners (Success, Failure, Warning, Info, Question), bug fixes for SplitContainer crash, and footnote/anchor link support.