MarkView.Avalonia.Mermaid
12.4.0
dotnet add package MarkView.Avalonia.Mermaid --version 12.4.0
NuGet\Install-Package MarkView.Avalonia.Mermaid -Version 12.4.0
<PackageReference Include="MarkView.Avalonia.Mermaid" Version="12.4.0" />
<PackageVersion Include="MarkView.Avalonia.Mermaid" Version="12.4.0" />
<PackageReference Include="MarkView.Avalonia.Mermaid" />
paket add MarkView.Avalonia.Mermaid --version 12.4.0
#r "nuget: MarkView.Avalonia.Mermaid, 12.4.0"
#:package MarkView.Avalonia.Mermaid@12.4.0
#addin nuget:?package=MarkView.Avalonia.Mermaid&version=12.4.0
#tool nuget:?package=MarkView.Avalonia.Mermaid&version=12.4.0
MarkView.Avalonia.Mermaid
Mermaid diagrams for MarkView.Avalonia, drawn with Mermaider in .NET: no browser, WebView or JavaScript.
Installation
dotnet add package MarkView.Avalonia.Mermaid
Usage
viewer.UseMermaid(); // MermaidStyle.Quiet
viewer.UseMermaid(MermaidStyle.Blueprint); // or Tonal
// every viewer of the application, at startup
MarkdownViewerDefaults.Extensions.AddMermaid();
Include the package's theme in App.axaml to give diagrams the colours you choose (without it, the default colours are used):
<StyleInclude Source="avares://MarkView.Avalonia.Mermaid/Themes/MermaidTheme.axaml" />
Write diagrams in fenced mermaid blocks:
```mermaid
flowchart LR
A[Input] --> B[MarkdownViewer]
B --> C[Avalonia UI]
```
Flowcharts, sequence, class, state and entity-relationship diagrams, Gantt and pie charts, git graphs, mind maps and timelines are supported. Diagrams are drawn again in place when the theme switches between light and dark, open in the viewer's lightbox when IsImageZoomEnabled is on, and can be saved as SVG or PNG.
Documentation
- Mermaid diagrams: styles, colours, fonts and when diagrams render.
- Lightbox and Saving images and diagrams.
- Resource keys: the diagram colours you can redefine.
The documentation site covers the whole library, and the demo shows every feature in the browser.
License
MIT © Nicolas Musset
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MarkView.Avalonia (>= 12.4.0)
- Mermaider (>= 0.15.1)
- SkiaSharp (>= 4.153.1)
- Svg.Controls.Skia.Avalonia (>= 12.0.0.15)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.