WPFMonaco 1.0.5
dotnet add package WPFMonaco --version 1.0.5
NuGet\Install-Package WPFMonaco -Version 1.0.5
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="WPFMonaco" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WPFMonaco" Version="1.0.5" />
<PackageReference Include="WPFMonaco" />
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 WPFMonaco --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WPFMonaco, 1.0.5"
#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 WPFMonaco@1.0.5
#: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=WPFMonaco&version=1.0.5
#tool nuget:?package=WPFMonaco&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WPFMonaco
A fully-featured WPF wrapper control for Microsoft's Monaco editor (the code editor that powers VS Code), built on WebView2, provides configuration binding, common methods and events.
Recommended Windows apps https://iceskydev.github.io/AppDoc/
โจ Features
Monaco editor version v0.55.1
- Monaco option (DependencyProperty):
- Theme
- ModelLanguage
- ReadOnly
- Fontfamily
- FontSize
- MinimapEnabled
- TabSize
- WordWrap
- LineNumber
- LineHeight
- Folding
- StickyScroll
- Monaco method:
- GetLanguages
- GetText
- SetText
- GetPosition
- SetPosition
- GetSelection
- SetSelection
- Focus
- Format
- Clear
- Monaco event:
- ContentChanged
- CursorPositionChanged
- SelectionChanged
- EditorFocused
- EditorBlurred
- MouseDown
- MouseUp
- KeyDown
- KeyUp
- LanguageChanged
- ScrollChanged
๐ฆ Installation
Prerequisites
- .NET 8.0 or later
- Microsoft Edge WebView2 Runtime installed
- Visual Studio 2022 or later (recommended)
๐ Quick Start
Basic Usage
<Window xmlns:editor="clr-namespace:WPFMonaco;assembly=WPFMonaco">
...
<editor:MonacoEditor Text="{Binding Text}"/>
...
</Window>
๐กAdd package from nuget
dotnet add package WPFMonaco
๐Sample Screenshot
Json in light theme
Xml in dark theme
๐ ๏ธ Building from Source
Requirements
- Visual Studio 2022
- .NET 8.0 SDK
- WebView2 Runtime
Steps
- Clone the repository
- Open WPFMonaco.sln
- Build the solution
- Reference the output assembly in your project
๐ Useful Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0-windows7.0
- Microsoft.Web.WebView2 (>= 1.0.3595.46)
- Newtonsoft.Json (>= 13.0.4)
-
net8.0-windows7.0
- Microsoft.Web.WebView2 (>= 1.0.3595.46)
- Newtonsoft.Json (>= 13.0.4)
-
net9.0-windows7.0
- Microsoft.Web.WebView2 (>= 1.0.3595.46)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.