RoslynPad.Editor.Windows 5.0.0

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

RoslynPad.Editor.Windows

A Roslyn-powered code editor control for WPF, built on AvalonEdit. Provides completion, diagnostics, signature help, quick actions, and code folding out of the box.

Key Types

RoslynCodeEditor

The main editor control. Extends CodeTextEditor with full Roslyn integration.

<Window xmlns:editor="clr-namespace:RoslynPad.Editor;assembly=RoslynPad.Editor.Windows">
    <editor:RoslynCodeEditor x:Name="Editor"
        FontFamily="Consolas"
        ContextActionsIcon="{StaticResource Bulb}" />
</Window>
var documentId = await editor.InitializeAsync(
    host,
    new ClassificationHighlightColors(),
    workingDirectory,
    documentText: string.Empty,
    SourceCodeKind.Script);

Properties: IsCodeFoldingEnabled, IsBraceCompletionEnabled, ContextActionsIcon

ClassificationHighlightColors

Default syntax highlighting colors with configurable brushes.

Brushes: TypeBrush, MethodBrush, KeywordBrush, StringBrush, CommentBrush, BraceMatchingBrush, and more.

ThemeClassificationColors

Creates syntax highlighting from a VS Code Theme (from the RoslynPad.Themes package).

var theme = await themeReader.ReadThemeAsync(themeFile, ThemeType.Dark);
var colors = new ThemeClassificationColors(theme);
await editor.InitializeAsync(host, colors, workingDirectory, "", SourceCodeKind.Script);

AvalonEditTextContainer

Bridges AvalonEdit's TextDocument to Roslyn's SourceTextContainer.

CreatingDocumentEventArgs

Raised during initialization. Use to customize document creation (e.g., for REPL chaining):

editor.CreatingDocument += (sender, args) =>
{
    args.DocumentId = host.AddRelatedDocument(
        previousDocumentId,
        new DocumentCreationArgs(args.TextContainer, workingDirectory,
            SourceCodeKind.Script, args.TextContainer.UpdateText));
};

For a full initialization and editor integration sample, see the samples directory.

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.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on RoslynPad.Editor.Windows:

Package Downloads
Stride.Assets.Presentation

Package Description

FastReport.WPF.RoslynPad.Demo

RoslynPad syntax editor for FastReport.WPF

StorageVertexConfig

Package Description

RevitExplorer.Scripting

Revit Database Scripting

CDS.CSharpScripting

C# code editor (using RoslynPad) and simplified C# compilation and execution

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on RoslynPad.Editor.Windows:

Repository Stars
stride3d/stride
Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
Version Downloads Last Updated
5.0.0 146 5/21/2026
4.12.1 18,720 2/7/2025
4.12.0-1.final 279 9/29/2024
4.8.0 10,571 11/28/2023
4.4.0 9,699 12/7/2022
1.2.0 88,891 7/18/2020
1.0.4 15,517 11/2/2017
1.0.3 2,974 9/6/2017
1.0.2 1,424 9/5/2017
1.0.1 1,640 9/3/2017
1.0.0 1,590 9/2/2017