Skip to content

IceSkyDev/WPFMonaco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 6.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 Json in light theme

Xml in dark theme Xml in dark theme

🛠️ Building from Source

Requirements

  • Visual Studio 2022
  • .NET 6.0 SDK or later
  • WebView2 Runtime

Steps

  1. Clone the repository
  2. Open WPFMonaco.sln
  3. Build the solution
  4. Reference the output assembly in your project

Projects using this component

  • C# to config tool: A Windows application that converts C# entity classes into strings in four formats: Json, XML, YAML and TOML
  • Josn Tools: A JSON text processing tool supports view, edit, and multiple conversion functions.

🔗 Useful Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published