LeXtudio.Win2D.UnoCompat 0.1.2

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

Win2D.UnoCompat

Win2D.UnoCompat is a desktop-first compatibility shim that provides a subset of the Win2D API surface for Uno Platform apps.

It translates Microsoft.Graphics.Canvas drawing and text APIs into SkiaSharp operations so Uno projects can compile and run without the native Win2D package on non-Windows targets.

Current scope:

  • Provide a lightweight CanvasControl for Uno Skia applications.
  • Support basic drawing sessions, strokes, shapes, geometry, and text layout.
  • Keep public namespaces close to Win2D so existing source code needs fewer changes.
  • Track parity explicitly and avoid pretending unsupported Win2D APIs are complete.

Screenshot & Video

TODO

Supported Platforms

  • Windows 11 (Windows 10 may work but is not a primary target)
  • macOS, 3 most recent versions from 2023-2025
  • Ubuntu latest LTS (other Linux distributions may work but are not primary targets)

If you are looking for support of a specific platform, business sponsorship is the way to accelerate that work. Please reach out to us at homepage.

Get Started

One NuGet package is available:

  • NuGet Win2D-compatible drawing and text primitives backed by SkiaSharp.

Default usage

dotnet add package LeXtudio.Win2D.UnoCompat
xmlns:canvas="using:Microsoft.Graphics.Canvas.UI.Xaml"

<canvas:CanvasControl Draw="Canvas_Draw" />
using Microsoft.Graphics.Canvas.UI.Xaml;
using Microsoft.Graphics.Canvas.Text;
using Windows.UI;

private void Canvas_Draw(CanvasControl sender, CanvasDrawEventArgs args)
{
    var ds = args.DrawingSession;
    ds.DrawLine(12, 12, 240, 12, Colors.DeepSkyBlue, 2);
    ds.DrawRectangle(12, 32, 180, 72, Colors.OrangeRed, 1);
    ds.DrawText("Hello from Win2D.UnoCompat", 16, 56, Colors.White, new CanvasTextFormat
    {
        FontFamily = "Segoe UI",
        FontSize = 18
    });
}

Current Status

Early preview (v0.x.y) releases are available on NuGet.

This package is a compatibility shim, not a full Win2D reimplementation. It currently focuses on the subset needed by LeXtudio Uno tools and related samples.

TODO Items Before v1.0.0

  • Expand drawing session parity
  • Improve text layout fidelity
  • Add more geometry operations
  • Complete parity reporting in package documentation
  • Add visual regression samples

License

Win2D.UnoCompat is licensed under the MIT License. See LICENSE for details.

Copyright (c) 2026 LeXtudio, Inc. All rights reserved.

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 (2)

Showing the top 2 NuGet packages that depend on LeXtudio.Win2D.UnoCompat:

Package Downloads
LeXtudio.Windows

Uno Platform-friendly shims for System.Windows.*, System.Windows.Media.*, and System.Windows.Documents.* — the WPF namespace surface needed to port WPF code to Uno without modifying source files.

LeXtudio.UnoEdit

UnoEdit — a cross-platform text editor component (AvalonEdit) for Uno Platform and WinUI 3.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 0 6/22/2026
0.1.1 80 6/21/2026
0.1.0 100 5/27/2026