LeXtudio.Windows 0.7.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package LeXtudio.Windows --version 0.7.0
                    
NuGet\Install-Package LeXtudio.Windows -Version 0.7.0
                    
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.Windows" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LeXtudio.Windows" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="LeXtudio.Windows" />
                    
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.Windows --version 0.7.0
                    
#r "nuget: LeXtudio.Windows, 0.7.0"
                    
#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.Windows@0.7.0
                    
#: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.Windows&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=LeXtudio.Windows&version=0.7.0
                    
Install as a Cake Tool

LeXtudio.Windows

NuGet

A compatibility library providing WPF namespace shims for the Uno Platform, enabling straightforward porting of WPF code without source modification.

Overview

LeXtudio.Windows implements portable equivalents of WPF types from System.Windows.*, System.Windows.Media.*, and System.Windows.Documents.* namespaces. These shims allow WPF-based libraries to compile and run on Uno Platform (both Uno Desktop and WinUI 3) with minimal code changes.

Why Use This?

When porting a WPF library to Uno Platform, you typically face a choice:

  1. Modify all source files to remove WPF dependencies
  2. Use compatibility shims to maintain the original surface

This library chooses option 2. By providing stub implementations of common WPF types, it lets you keep your source code structure intact while running on Uno/WinUI targets.

Installation

dotnet add package LeXtudio.Windows

Or via NuGet Package Manager:

Install-Package LeXtudio.Windows

Supported Platforms

  • Uno Platform (net9.0-desktop): Linux, macOS, iOS, Android
  • WinUI 3 (net9.0-windows10.0.19041.0): Windows 10+

What's Included

System.Windows

  • WPF-compatible core types and runtime helpers including DependencyObject, FrameworkElement, DependencyProperty, RoutedEvent, RoutedCommand, and IWeakEventListener
  • Clipboard and input support via DataObject, DataFormats, Keyboard, Mouse, CommandBinding, and IInputElement
  • Platform-friendly helpers such as Dispatcher, SystemFonts, SystemColors, FocusManager, and InputLanguageManager

System.Windows.Media

  • WinUI-backed media helpers for Brushes, Colors, ImageSource, Pen, and Matrix
  • Text layout and formatting support with Typeface, FormattedText, DrawingContext, CompositionTarget, and NumberSubstitution
  • Rich text styling via TextDecorations, TextDecorationCollection, TextEffect, and text formatting helpers

System.Windows.Documents

  • Rich document model elements like FlowDocument, Paragraph, Run, Span, Hyperlink, and Table
  • Editing and selection types including TextRange, TextPointer, TextSelection, TextElement, TextContainer, List, and ListItem
  • Serialization and document interoperability helpers for XAML/RTF scenarios

System.Windows.Markup and Controls

  • XAML serialization helpers such as XamlReader, XamlWriter, and XamlDesignerSerializationManager
  • Control shims and bridge extensions including RichTextBox, TextBlock extensions, Image, PanelShims, and WinUI interoperability helpers

Usage Example

For a WPF-based library, no changes needed:

using System.Windows;
using System.Windows.Media;

public class TextFormatter
{
    public void Format()
    {
        var family = new FontFamily("Consolas");
        var weight = FontWeight.Bold;
        var style = FontStyle.Italic;
        
        // Code works on WPF, Uno Desktop, and WinUI 3
    }
}

The library automatically provides the correct implementation for your target platform:

  • On Uno Desktop, shims provide minimal functionality matching WPF surface
  • On WinUI 3, shims align with WinUI equivalents

Architecture Notes

  • Target Frameworks: net9.0-desktop (Uno) and net9.0-windows10.0.19041.0 (WinUI)
  • Nullable: Disabled for broader compatibility with older WPF libraries
  • Documentation: Includes XML docs for all public types
  • License: MIT

Limitations

These are compatibility shims, not full WPF reimplementations. They provide:

  • Type definitions matching WPF's public surface
  • Core properties and behaviors
  • Minimal computation where needed (e.g., FontWeight conversions)

They do not provide:

  • Full rendering pipelines
  • Advanced typography features
  • Performance optimizations matched to native platforms

For complex text layout or specialized rendering, defer to platform-specific APIs once shims are loaded.

  • UnoRichText — Cross platform rich text controls. Ported from RichTextBox (WPF).
  • UnoEdit — Code editor for Uno Platform and WinUI. Ported from AvalonEdit (WPF).

License

MIT — See LICENSE file in the repository.

Contributing

Found an issue or missing type? Contributions welcome! Please file an issue or submit a PR to the this repo repository.

Product Compatible and additional computed target framework versions.
.NET net10.0-desktop1.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.

NuGet packages (2)

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

Package Downloads
LeXtudio.UnoEdit

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

LeXtudio.RichText

LeXtudio.RichText — a rich text layout control for Uno Platform, providing RichTextBlock, Paragraph, Span, Bold, Italic, Hyperlink, InlineUIContainer and related document types backed by PretextSharp.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.1 47 5/22/2026
0.7.0 44 5/22/2026
0.6.15 78 5/19/2026
0.6.14 98 5/18/2026
0.6.13 86 5/18/2026
0.6.12 105 5/17/2026
0.6.11 184 5/16/2026
0.6.10 97 5/15/2026
0.6.9 81 5/15/2026
0.6.8 89 5/15/2026
0.6.7 93 5/15/2026
0.6.6 94 5/15/2026
0.6.5 93 5/15/2026
0.6.4 93 5/15/2026
0.6.3 93 5/13/2026
0.6.2 85 5/13/2026
0.6.1 92 5/9/2026
0.6.0 97 5/7/2026
0.5.0 88 5/5/2026
0.4.3 95 5/1/2026
Loading failed