MarkdownToXamlConverter.Maui 0.0.1

dotnet add package MarkdownToXamlConverter.Maui --version 0.0.1
                    
NuGet\Install-Package MarkdownToXamlConverter.Maui -Version 0.0.1
                    
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="MarkdownToXamlConverter.Maui" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkdownToXamlConverter.Maui" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="MarkdownToXamlConverter.Maui" />
                    
Project file
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 MarkdownToXamlConverter.Maui --version 0.0.1
                    
#r "nuget: MarkdownToXamlConverter.Maui, 0.0.1"
                    
#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 MarkdownToXamlConverter.Maui@0.0.1
                    
#: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=MarkdownToXamlConverter.Maui&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=MarkdownToXamlConverter.Maui&version=0.0.1
                    
Install as a Cake Tool

MarkdownToXaml.Maui

MarkdownToXaml.Maui is a .NET library that converts a limited Markdown subset into .NET MAUI-compatible XAML fragments for use in multi-platform MAUI apps.

It is the MAUI library counterpart to the converter used in the API project.

Features

  • Convert Markdown into a MAUI XAML fragment
  • Return metadata such as unsupported lines, notes, and plain-text preview
  • Expose a compact MDtoXamlConverter API for fragment-focused usage
  • Build as a plain net8.0 library by default, or opt into platform-specific MAUI target frameworks when needed

Supported Markdown

  • Headings: # through ######
  • Paragraphs
  • Bold: **text** and __text__
  • Italic: *text* and _text_
  • Unordered lists: -, *, +
  • Ordered lists: 1., 2., 3.
  • Task items: - [x] done, - [ ] todo

Current limitations

These inputs are currently treated as unsupported and rendered as plain labels:

  • Blockquotes
  • Fenced code blocks
  • Tables

Project layout

  • Services/MarkdownToXamlConverter.cs - conversion engine for MAUI XAML fragments
  • Services/MDtoXamlConverter.cs - compact facade for Markdown-to-fragment workflows
  • Models/MarkdownConversionResult.cs - result payload returned by the converter

Usage

Convert to XAML

using MarkdownToXaml.Maui.Services;

var converter = new MDtoXamlConverter();

var result = converter.Convert(
    "# Hello\nThis is **bold** and *italic*.\n- [x] Ship it",
    "Preview");

var xamlFragment = result.Xaml;
var previewText = result.PreviewPlainText;

Convert to a fragment string directly

using MarkdownToXaml.Maui.Services;

var converter = new MDtoXamlConverter();

var xamlFragment = converter.ConvertToFragment(
    "# Release Notes\n- First item\n- Second item",
    "Build 42");

Example output

Calling Convert(...) returns a MarkdownConversionResult with:

  • Xaml - generated VerticalStackLayout fragment
  • UnsupportedLines - lines that are not fully supported
  • Notes - informational notes about supported syntax
  • PreviewPlainText - simplified plain-text preview

Build

Build the cross-platform library target:

dotnet build MarkdownToXaml.Maui/MarkdownToXaml.Maui.csproj

Build and pack a NuGet package:

dotnet pack MarkdownToXaml.Maui/MarkdownToXaml.Maui.csproj -c Package

Opt into platform-specific MAUI target frameworks when needed:

dotnet build MarkdownToXaml.Maui/MarkdownToXaml.Maui.csproj -p:BuildMauiPlatforms=true

Notes for .NET 8 builds

The default target is net8.0, which keeps the package broadly usable and easy to test on any host. If you pass -p:BuildMauiPlatforms=true, the project also includes net8.0-android and host-supported Apple or Windows MAUI targets.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1 100 4/28/2026

Android 26+ support problems has been fixed