CSharpForMarkup
Concise, declarative C# UI markup for .NET browser / native UI frameworks
Install / Use
/learn @VincentH-Net/CSharpForMarkupREADME
C# Markup 2
Concise next-gen C# Markup for .NET UI frameworks
C# Markup 2 for Uno Platform
C# Markup 2 supports multiple UI frameworks, including the excellent Uno Platform.
If you don't know Uno, I recommend you check them out; Uno is one of the best and most mature .NET UI frameworks, it offers an impressive breadth of features that will have your back when you need to create real-world production apps end2end, fast.
Quick play-around
dotnet new install Uno.Templates
dotnet new install Modern.CSharp.Templates
md UnoCSharpMarkup2
cd UnoCSharpMarkup2
dotnet new unoapp -preset recommended
dotnet new mcs-uno-markup2 --presentation mvux --renderer skia --allow-scripts yes
Markup options at a glance - good for everyone!
Uno Platform supports both XAML and C# UI with Uno C# Markup. C# Markup 2 adds another option that goes above and beyond what gen-1 C# Markup variants offer.
It's good to have options - everyone wins: devs get the experience that they like best, and the UI framework gains more adoption. Check it out and pick what you like!
As a first impression, here's a quick side-by-side comparison:

Enjoy a Flutter-like UI development experience with C# Markup 2:
- Build .NET applications fully in C#
- Unclutter your markup - while reading and writing.<br />
- C# Markup 2 goes above and beyond gen 1 C# Markup approaches (e.g. Maui or Uno) to eliminate a lot of verbosity: no more endless repetitions of
new,HorizontalAlignment = HorizontalAlignment.Center,() =>ornameof(), no more specifying for each and everyTextBlockbinding that yes, you want to bind to theTextproperty... - Separated markup namespaces eliminate intellisense pollution, allow quick discovery and encourage clean separation of markup and logic: no more intellisense lists where you have to search in a sea of irrelevant options for the few that you are interested in. See only Markup API's while editing
MyPage.cs, see UI framework and other API's while editingMyPage.logic.cs.
- C# Markup 2 goes above and beyond gen 1 C# Markup approaches (e.g. Maui or Uno) to eliminate a lot of verbosity: no more endless repetitions of
- Target browsers and native desktop / mobile
- Use existing UI frameworks. Mature or bleeding edge is your choice: WPF, WinUI 3 for Windows App SDK and Uno Platform. Coming: AvaloniaUI, Maui, possibly Blazor.
- Use the built-in MVVM support - or any other update model that supports your UI framework (e.g. Uno's MVUX or ReactiveUI)
- Use for part or all of your application UI
- Designed to handle large UI fast: practically allocation-free, no reflection, efficient C#
No XAML / HTML / JavaScript / CSS required. No engine or layers to get in your way.

NuGet<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Chat (if needed, join DotNetEvolution first)<br />
<br /> The best place to ask questions or help!
Getting Started
- Uno Platform / WinUI 3: Getting started with C# Markup 2 for WinUI 3 and Windows App SDK / Uno Platform
- WPF: Getting started with C# Markup 2 for WPF
Looking for C# Markup 1? Find it here
News
July 14, 2025
Mapsui 5 support added!
Mapsui 5 - currently in beta, and one of the best OSS .NET libraries for maps - now has full support in C# Markup 3.1 for Uno Platform 6.0!
An example page using Mapsui is added to the example app in this repo, demonstrating how to use Mapsui with C# Markup 2. Browse Live Mapsui 5.0 samples to experience the possibilities; see the samples source for how.
July 4, 2025
ScottPlot 5 support added!
ScottPlot.NET - one of the best OSS .NET libraries for graphs and charts - now has full support in C# Markup 3.1 for Uno Platform 6.0!
An example page using ScottPlot is added to the example app in this repo, demonstrating how to use ScottPlot with C# Markup 2. Use the excellent ScottPlot 5.0 Cookbook to create beautiful graphs!
May 12, 2025
New C# Markup 3.1 for Uno Platform 6.0
Hot on the heels of the game-changing Uno 6.0 release, today's release adds full support for Uno SDK 6.0 / Windows App SDK 1.7 to all CSharpMarkup.WinUI NuGets.
Includes support for all API improvements in Uno SDK 6.0:
- 20+ WinUI API's are no longer marked unsupported
- Add support for ellipse shape to
ProgressBarTemplateSettings - New
TitleBarsupport, including strongly-typed access to all newTitlebarresources inThemeResource - New
TextBoxExtensionsallow to specifyInputReturnType
The example app in the repo is also updated to Uno 6.0 / Windows App SDK 1.7.
May 5, 2025
New C# Markup 3.0 for Uno Platform 5.6 and .NET 9
Today's release adds full support for Uno SDK 5.6 / Windows App SDK 1.6 and .NET 9 / .NET 8 to all CSharpMarkup.WinUI NuGets.
Includes support for all improvements in Uno SDK 5.6:
- 80+ WinUI API's are no longer marked unsupported
- new
ScrollPresenterAutomationPeer,FauxGradientBorderPresenter - new
NewFrameworkTemplateBuildersupport
The example app in the repo is also updated to .NET 9 plus Uno 5.6 / Windows App SDK 1.6 and demonstrates how to use C# partial properties with MVVM Community Toolkit to support AOT.
May 7, 2024
New C# Markup 2.4 for Uno Platform 5.2 incl .NET Single Project
Today's release is fully updated to Updated to Uno 5.2 including Uno's .NET Single Project and uno.sdk!
Plus:
- Added support for latest
dotnet new unoapptemplate - Updated to Uno.Extensions.* 4.1
- Updated to Microsoft.WindowsAppSDK 1.5
Dec 21, 2023
New C# Markup 2 templates for Uno Platform 5
In addition to some new C# Markup 2 methods, today's release adds support for the new C# Markup 2 templates for Uno Platform 5: an updated mcs-uno-markup2 template, and a new mcs-uno-view template.
- Enjoy improved frictionless startup for both existing and new Uno solutions - whether created with Uno's
dotnet new unoapptemplate or with the Uno solution wizard for Visual Studio - Full support for .NET 8 / .NET 7, as well as model types MVUX / MVVM / none
- The new
mcs-uno-viewtemplate is used by the convenientNew-View.ps1script, which is included inmcs-uno-markup2 - Templates are now pre-structured in accordance with best practices for maintainability and code reuse of C# Markup 2 UI.
Nov 18, 2023
2.3 Release is GA - adds support for .NET 8, Uno 5 plus 5 Uno Libraries!
This release i
