KryptonModern.Editor 2026.11.24.644

Suggested Alternatives

Fungusware.WinFormsThemes.Editor

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

KryptonModern.Editor

A themeable WinForms code editor control. Syntax colouring, line numbers, minimap, breakpoint margin, brace matching, auto-close and auto-indent, completion list, find highlighting, squiggles, undo/redo. Plain WinForms, no third-party packages (it does not need Krypton). By Fungusware, MIT license.

It is the editor inside Krypton Studio (KM_FORM=4 in the demo).

Use it

using KryptonModern.Editor;

var editor = new CodeEditor { Dock = DockStyle.Fill };
editor.Language = Languages.FromPath("Program.cs");   // or Languages.CSharp
editor.Theme = EditorTheme.Dark;                      // or EditorTheme.Light, or your own
editor.LoadText(File.ReadAllText(path));
Controls.Add(editor);

editor.Changed += (_, _) => Text = editor.Modified ? "Program.cs *" : "Program.cs";
editor.CaretMoved += (_, _) => status.Text = $"Ln {editor.Caret.Line + 1}, Col {editor.Caret.Column + 1}";
File.WriteAllText(path, editor.GetText()); editor.MarkSaved();

What you can change

Thing How
Colours EditorTheme is plain data. EditorTheme.FromBase(background, foreground, accent, tokenColours, dark) fills every derived colour. The demo's EditorThemes.From(Tokens) maps a KryptonModern theme to one.
A language Implement ILanguage: tokenise one line given the state from the previous line (for block comments and multi-line strings). Built in: C#, JSON, XML, Markdown, plain text.
Completion Set CompletionProvider to your own ICompletionProvider, or null to turn it off. The default offers keywords plus words in the file.
Diagnostics editor.Squiggles[line] = new Squiggle(Severity.Error, "message") shows a wavy underline, minimap mark and tooltip. They clear on the next edit.
Breakpoints editor.Breakpoints (click the left margin to toggle) and BreakpointsChanged.
Look EditorFontFamily, EditorFontSize, ShowMinimap, ShowLineNumbers, ShowIndentGuides, IndentSize, ReadOnly.
Edits Replace, InsertText, BeginGroup/EndGroup (one undo step), plus the usual Undo, Redo, Cut, Copy, Paste, Find, ReplaceAll, GoTo.

Why it stays fast

  • The text is a list of lines. Every edit goes through one method and is stored as an edit, so undo does not copy the document.
  • Lexing keeps one int of state per line and runs on a worker thread in chunks. The lines on screen are tokenised on demand when painted, so typing never waits on the rest of the file.
  • Adjacent text of the same colour is drawn in one call. The minimap is a cached bitmap that is rebuilt only when the text, theme, size or scroll position changes.
  • Measured in the demo on a 100,000-line, 9.9 MB C# file: open 0.3 s, jump to the end 30 ms, typing about 0.6 ms per character, a repaint about 12 ms.

Limits

No word wrap, no code folding, no multiple carets, and single-line find only. Tabs are converted to spaces when a file is loaded. Breakpoint and squiggle line numbers are not shifted when lines are inserted above them.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows 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.
  • net8.0-windows7.0

    • No dependencies.

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
2026.11.24.644 74 11/23/2026 2026.11.24.644 is deprecated because it is no longer maintained.