Aqua0801.MauiMarkdownRenderer
1.0.2
dotnet add package Aqua0801.MauiMarkdownRenderer --version 1.0.2
NuGet\Install-Package Aqua0801.MauiMarkdownRenderer -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aqua0801.MauiMarkdownRenderer" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aqua0801.MauiMarkdownRenderer" Version="1.0.2" />
<PackageReference Include="Aqua0801.MauiMarkdownRenderer" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aqua0801.MauiMarkdownRenderer --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aqua0801.MauiMarkdownRenderer, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aqua0801.MauiMarkdownRenderer@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aqua0801.MauiMarkdownRenderer&version=1.0.2
#tool nuget:?package=Aqua0801.MauiMarkdownRenderer&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MauiMarkdownRenderer
Native MAUI Markdown + LaTeX renderer with syntax highlighting.
Installation
<PackageReference Include="Aqua0801.MauiMarkdownRenderer" Version="1.0.1" />
Setup
// MauiProgram.cs
builder.UseMauiMarkdownRenderer();
Windows Setup (Toast Notifications)
If you use the built-in copy button's toast feedback on Windows,
add the following to your Platforms/Windows/App.xaml.cs:
namespace ....WinUI
{
public partial class App : MauiWinUIApplication
{
public App()
{
this.InitializeComponent();
AppDomain.CurrentDomain.ProcessExit += (_, _) =>
{
AppNotificationManager.Default.Unregister();
};
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
AppNotificationManager.Default.Register();
}
}
}
Usage
xmlns:md="clr-namespace:MauiMarkdownRenderer;assembly=MauiMarkdownRenderer"
mdr.Text = "## hello world";
foreach(var chunk in chunks)
mdr.Append(chunk); //optimized partial render
Syntax Highlighting
// Customize colors (light/dark per scope)
mdr.Colorizer.ColorMap["Keyword"] = new ThemeColors(Colors.Blue, Colors.SteelBlue);
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Text |
string |
"" |
Full markdown content |
BaseFontSize |
double |
14 |
Base font size |
LatexFontSize |
double |
14 |
LaTeX render size |
TextColor |
Color |
null |
Text color (inherits if null) |
LatexTextColor |
Color |
null |
LaTeX text color |
CodeBackgroundColor |
Color |
#F6F8FA |
Code block background |
QuoteBarColor |
Color |
#D0D7DE |
Blockquote bar color |
WarmUp |
bool |
false |
Pre-warm on first attach |
AppendThrottle |
TimeSpan |
50ms |
Streaming throttle interval |
Events
| Event | Args | Description |
|---|---|---|
RenderFinished |
RenderType |
Fires after each render completes |
Math Fonts
await mdr.AddMathFontAsync("latinmodern-math.otf");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-android36.0
- CommunityToolkit.Maui (>= 13.0.0)
- CSharpMath.SkiaSharp (>= 0.5.0)
- Markdig (>= 0.30.0)
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.116.1)
-
net10.0-ios26.0
- CommunityToolkit.Maui (>= 13.0.0)
- CSharpMath.SkiaSharp (>= 0.5.0)
- Markdig (>= 0.30.0)
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.116.1)
-
net10.0-maccatalyst26.0
- CommunityToolkit.Maui (>= 13.0.0)
- CSharpMath.SkiaSharp (>= 0.5.0)
- Markdig (>= 0.30.0)
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.116.1)
-
net10.0-windows10.0.19041
- CommunityToolkit.Maui (>= 13.0.0)
- CSharpMath.SkiaSharp (>= 0.5.0)
- Markdig (>= 0.30.0)
- Microsoft.Maui.Controls (>= 10.0.20)
- SkiaSharp.Views.Maui.Controls (>= 3.116.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.