LoomEditor.Rendering 0.4.0

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

LoomEditor.Rendering

Install

dotnet add package LoomEditor.Rendering --prerelease

--prerelease is needed while the version has a suffix (for example 0.1.0-alpha.1). Most applications want LoomEditor.WinUI, which brings this package and the others.

What it is

Draws the viewport of a ViewModel on an IRenderSurface. It knows Win2D (through Win2D/) but nothing about XAML controls: the LoomEditor control in LoomEditor.WinUI owns the canvas, the timer and the focus.

What is here (phase 2)

  • TextViewRenderer (+ .Gutter.cs): draws only the visible lines at the scroll position (offsets are computed in int relative to the viewport, see ADR 0005), then the selection, the current line highlight, the caret, and the gutter with the line numbers. It reports the widest line it drew to ViewLayout.SetMaxLineWidth. OnFontChanged swaps the measurer and clears the cache after a font, tab size or DPI change.
  • LineLayoutCache: least-recently-used cache of line layouts, keyed by the text of the line.
  • ITextMeasurer, ILineLayout, IRenderSurface: what the renderer needs from a backend. Win2D/ implements them with DirectWrite (Win2DTextMeasurer, Win2DLineLayout, Win2DRenderSurface); the tests use fakes.
  • CursorBlinking, TextEditorCursorBlinkingStyle: the caret blinking state machine. It has no timer; the control ticks it.
  • OverflowLabel: the "Show more" label of lines longer than 10,000 characters.
  • RenderLineHighlight: which parts of the current line are highlighted.

Rules

  • Lines are laid out by DirectWrite; nothing assumes a fixed character width.
  • Everything here runs on the UI thread. The classes say so in their <remarks>.

Monaco sources: src/vs/editor/browser/viewParts/ (viewLines, lineNumbers, currentLineHighlight, viewCursors). The Monaco → LoomEditor map is in docs/PORTING.md.

Product Compatible and additional computed target framework versions.
.NET net11.0-windows10.0.26100 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 LoomEditor.Rendering:

Package Downloads
LoomEditor.WinUI

LoomEditor: a native, Native AOT-compatible code editor control for WinUI 3, ported from the Monaco editor.

LoomEditor.Avalonia

LoomEditor: a native, Native AOT-compatible code editor control for Avalonia, ported from the Monaco editor.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 553 11/13/2026
0.6.0 487 11/10/2026
0.5.0 924 11/5/2026
0.4.0 175 11/2/2026
0.3.0 267 11/2/2026
0.2.0-alpha.5 101 10/30/2026
0.2.0-alpha.4 70 10/30/2026
0.2.0-alpha.3 72 10/30/2026
0.2.0-alpha.2 70 10/30/2026
0.2.0-alpha.1 66 10/30/2026
0.1.0-alpha.1 76 10/30/2026