![]() |
VOOZH | about |
dotnet add package RoslynPad.Editor.Avalonia --version 5.0.0
NuGet\Install-Package RoslynPad.Editor.Avalonia -Version 5.0.0
<PackageReference Include="RoslynPad.Editor.Avalonia" Version="5.0.0" />
<PackageVersion Include="RoslynPad.Editor.Avalonia" Version="5.0.0" />Directory.Packages.props
<PackageReference Include="RoslynPad.Editor.Avalonia" />Project file
paket add RoslynPad.Editor.Avalonia --version 5.0.0
#r "nuget: RoslynPad.Editor.Avalonia, 5.0.0"
#:package RoslynPad.Editor.Avalonia@5.0.0
#addin nuget:?package=RoslynPad.Editor.Avalonia&version=5.0.0Install as a Cake Addin
#tool nuget:?package=RoslynPad.Editor.Avalonia&version=5.0.0Install as a Cake Tool
A Roslyn-powered code editor control for Avalonia, built on AvaloniaEdit. Provides completion, diagnostics, signature help, quick actions, and code folding out of the box.
RoslynCodeEditorThe main editor control. Extends CodeTextEditor with full Roslyn integration.
<Window xmlns:editor="clr-namespace:RoslynPad.Editor;assembly=RoslynPad.Editor.Avalonia">
<editor:RoslynCodeEditor x:Name="Editor"
FontFamily="Consolas" />
</Window>
var documentId = await editor.InitializeAsync(
host,
new ClassificationHighlightColors(),
workingDirectory,
documentText: string.Empty,
SourceCodeKind.Script);
Properties: IsCodeFoldingEnabled, IsBraceCompletionEnabled, ContextActionsIcon
ClassificationHighlightColorsDefault syntax highlighting colors with configurable brushes.
Brushes: TypeBrush, MethodBrush, KeywordBrush, StringBrush, CommentBrush, BraceMatchingBrush, and more.
ThemeClassificationColorsCreates 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);
AvalonEditTextContainerBridges AvaloniaEdit's TextDocument to Roslyn's SourceTextContainer.
CreatingDocumentEventArgsRaised 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.