Loading...
Loading...
Implement Syncfusion WPF SfMarkdownViewer for rendering and displaying Markdown content in WPF applications. Use this when rendering Markdown text, loading Markdown from strings, files, or URLs, handling hyperlink clicks, or displaying Mermaid diagrams. Covers the Source property, HyperlinkClicked events, and MermaidBlockTemplate customization.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-markdown-viewerSfMarkdownViewer<Window
x:Class="GettingStarted.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markdown="clr-namespace:Syncfusion.UI.Xaml.Markdown;assembly=Syncfusion.SfMarkdownViewer.WPF"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<Grid>
<markdown:SfMarkdownViewer Source="# Hello World This is **bold** and *italic* text." />
</Grid>
</Window>using Syncfusion.UI.Xaml.Markdown;
SfMarkdownViewer markdownViewer = new SfMarkdownViewer();
markdownViewer.Source = "# Hello World\n\nThis is **bold** and *italic* text.";
this.Content = markdownViewer;| Property | Type | Purpose |
|---|---|---|
| | Raw Markdown string, file path, or HTTP/HTTPS URL |
| | Custom template for rendering mermaid code blocks |
| Event | Args | Purpose |
|---|---|---|
| | Fires when user clicks a hyperlink in rendered Markdown |
Source.mdSourceMermaidBlockTemplateSfDiagramHyperlinkClicked