You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- normalize Markdown table separators across all topics
- wrap API names, types, and literals (e.g. null) in code spans
- use <kbd> for keyboard shortcuts and refine minor wording
- remove redundant section dividers in Overview
Copy file name to clipboardExpand all lines: CS/CodeEditor/Docs/CodeEditor.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ WPF control that embeds Monaco Editor (VS Code editor) using WebView2 for code e
5
5
## Properties
6
6
7
7
| Name | Type | Description |
8
-
|------|------|-------------|
8
+
|----|----|-----------|
9
9
|`Text`|`string`| Gets or sets editor text. This is a dependency property. Supports two-way binding. |
10
10
|`EditorLanguage`|`string`| Gets or sets the programming language for syntax highlighting. This is a dependency property. Default: `"csharp"`|
11
11
|`ReadOnly`|`bool`| Gets or sets whether the editor is read-only. This is a dependency property. Default: `false`|
12
-
|`IsModified`|`bool`| Gets whether the text has been modified since the last save. This is a readonly dependency property. |
12
+
|`IsModified`|`bool`| Gets whether the content has been modified since the last save. This is a readonly dependency property. |
13
13
|`ShowLineNumbers`|`bool`| Gets or sets whether line numbers are displayed. This is a dependency property. Default: `true`|
14
14
|`LineNumbersMinChars`|`int`| Gets or sets the minimum number of character slots reserved for the line-number gutter. This is a dependency property. Default: `5`|
15
15
|`ShowMinimap`|`bool`| Gets or sets whether the minimap is displayed. This is a dependency property. Default: `false`|
@@ -18,44 +18,44 @@ WPF control that embeds Monaco Editor (VS Code editor) using WebView2 for code e
18
18
|`TabSize`|`int`| Gets or sets the tab size in spaces (1-64). This is a dependency property. Default: `4`|
19
19
|`InsertSpaces`|`bool`| Gets or sets whether spaces are inserted instead of tabs. This is a dependency property. Default: `true`|
20
20
|`DetectIndentation`|`bool`| Gets or sets whether indentation is detected from file content. This is a dependency property. Default: `true`|
21
-
|`AutoIndent`|`EditorAutoIndent`| Gets or sets the auto-indentation mode. This is a dependency property. Default: `EditorAutoIndent.Full`|
22
-
|`WordWrap`|`EditorWordWrap`| Gets or sets the word wrap mode. This is a dependency property. Default: `EditorWordWrap.Off`|
21
+
|`AutoIndent`|`EditorAutoIndent`| Gets or sets auto-indentation mode. This is a dependency property. Default: `EditorAutoIndent.Full`|
22
+
|`WordWrap`|`EditorWordWrap`| Gets or sets word wrap mode. This is a dependency property. Default: `EditorWordWrap.Off`|
23
23
|`EnableScrollBeyondLastLine`|`bool`| Gets or sets whether scrolling beyond the last line is allowed. This is a dependency property. Default: `true`|
24
24
|`ScrollBeyondLastColumn`|`int`| Gets or sets the number of columns to scroll beyond the last character. This is a dependency property. Default: `5`|
25
25
|`EnableSmoothScrolling`|`bool`| Gets or sets whether smooth scrolling is enabled. This is a dependency property. Default: `false`|
26
26
|`EnableStickyScroll`|`bool`| Gets or sets whether sticky scroll is enabled. This is a dependency property. Default: `true`|
27
27
|`EnableContextMenu`|`bool`| Gets or sets whether the context menu is enabled. This is a dependency property. Default: `true`|
28
28
|`EnableDragAndDrop`|`bool`| Gets or sets whether drag and drop is enabled. This is a dependency property. Default: `true`|
29
-
|`EnableMouseWheelZoom`|`bool`| Gets or sets whether zooming with Ctrl+MouseWheel is enabled. This is a dependency property. Default: `false`|
29
+
|`EnableMouseWheelZoom`|`bool`| Gets or sets whether zooming with <kbd>Ctrl</kbd>+<kbd>MouseWheel</kbd> is enabled. This is a dependency property. Default: `false`|
30
30
|`EnableQuickSuggestions`|`bool`| Gets or sets whether quick suggestions are enabled. This is a dependency property. Default: `true`|
31
31
|`EnableWordBasedSuggestions`|`bool`| Gets or sets whether word-based suggestions are enabled. This is a dependency property. Default: `true`|
32
32
|`EnableSuggestOnTriggerCharacters`|`bool`| Gets or sets whether suggestions appear automatically when typing trigger characters. This is a dependency property. Default: `true`|
33
33
|`EnableParameterHints`|`bool`| Gets or sets whether parameter hints are displayed. This is a dependency property. Default: `true`|
34
34
|`ThemeName`|`string`| Gets or sets the Monaco Editor theme name. This is a dependency property. Default: `"vs"`|
35
-
|`MarkAsSavedCommand`|`ICommand`| Gets the command that resets the IsModified flag. |
35
+
|`MarkAsSavedCommand`|`ICommand`| Gets the command that resets the `IsModified` flag. |
36
36
37
37
## Methods
38
38
39
39
| Name | Description |
40
-
|------|-------------|
40
+
|----|-----------|
41
41
|`GetAvailableLanguagesAsync(CancellationToken)`| Asynchronously retrieves a list of available programming language IDs. |
42
42
|`RegisterLanguage(LanguageDescriptor)`| Registers a custom programming language with Monarch tokenizer. |
43
43
|`RegisterTheme(MonacoTheme)`| Registers a custom Monaco Editor theme. |
44
-
|`MarkAsSaved()`| Resets the IsModified property to false. |
44
+
|`MarkAsSaved()`| Resets the `IsModified` property to `false`. |
45
45
|`Dispose()`| Releases WebView2 resources. |
46
46
47
47
## Events
48
48
49
49
| Name | Description |
50
-
|------|-------------|
50
+
|----|-----------|
51
51
|`EditorInitialized`| Occurs when the Monaco Editor is fully initialized and ready for commands. |
52
52
53
53
## Enums
54
54
55
55
### EditorAutoIndent
56
56
57
57
| Member | Description |
58
-
|--------|-------------|
58
+
|------|-----------|
59
59
|`None`| No automatic indentation |
60
60
|`Keep`| Keep current indentation |
61
61
|`Brackets`| Indent based on brackets |
@@ -65,6 +65,6 @@ WPF control that embeds Monaco Editor (VS Code editor) using WebView2 for code e
Copy file name to clipboardExpand all lines: CS/CodeEditor/Docs/CodeEditorService.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ public interface ICodeEditorService {
15
15
## Methods
16
16
17
17
| Name | Description |
18
-
|------|-------------|
18
+
|----|-----------|
19
19
|`MarkAsSaved()`| Resets the `IsModified` flag of the associated `CodeEditor` to `false`. |
20
20
|`GetLanguagesAsync(CancellationToken)`| Asynchronously retrieves a collection of available programming language IDs from the associated `CodeEditor`. |
21
21
|`RegisterLanguage(LanguageDescriptor)`| Registers a custom programming language with Monarch tokenizer in the associated `CodeEditor`. |
Copy file name to clipboardExpand all lines: CS/CodeEditor/Docs/Overview.md
+10-28Lines changed: 10 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
`CodeEditor` is a WPF control that embeds the [Monaco Editor](https://microsoft.github.io/monaco-editor/) (the editor engine used by Visual Studio Code) using [Microsoft WebView2](https://learn.microsoft.com/en-us/microsoft-edge/webview2/).
4
4
5
-
It includes modern code editing capabilities — syntax highlighting, folding, minimap, theming, and custom languages — within WPF applications.
5
+
The editor includes modern code editing capabilities — syntax highlighting, folding, minimap, theming, and custom languages — within WPF applications.
6
6
7
7
The primary editing surface is the `CodeEditor` control, which exposes a focused, WPF-friendly API.
8
8
9
-
The library also provides:
9
+
The library also includes:
10
10
11
11
-`ThemeBehavior` - integrates Monaco with DevExpress themes.
12
12
-`CodeEditorService` - a lightweight service for cases where direct interaction with the control is not sufficient.
@@ -37,8 +37,6 @@ Add the `CodeEditor` project to your solution and reference it from your WPF app
37
37
- Add project reference from your WPF app
38
38
- Ensure DevExpress WPF and WebView2 dependencies are resolved
39
39
40
-
---
41
-
42
40
### 2. Declare the XML namespace
43
41
44
42
```xml
@@ -58,9 +56,7 @@ Add the `CodeEditor` project to your solution and reference it from your WPF app
58
56
</Window>
59
57
```
60
58
61
-
---
62
-
63
-
### 3. Provide a ViewModel
59
+
### 3. Create a ViewModel
64
60
65
61
```csharp
66
62
usingDevExpress.Mvvm;
@@ -97,8 +93,6 @@ The editor content is automatically synchronized with the bound property.
The theme is updated automatically when the DevExpress theme changes.
148
140
149
-
---
150
-
151
141
### Custom Themes
152
142
153
143
You can register a custom Monaco theme programmatically:
@@ -174,7 +164,7 @@ For a complete list of commonly used Monaco theme color keys, see the official V
174
164
175
165
In addition to UI colors, Monaco themes support token-level styling via `Rules`.
176
166
177
-
Rules define how specific token types (such as `keyword`, `comment`, `string`, etc.) are rendered.
167
+
Rules define how specific token types (such as `keyword`, `comment`, `string`, and other) are rendered.
178
168
179
169
You can use `Rules` to override the appearance of existing token types or to define styling for custom tokens introduced by a custom language definition.
180
170
@@ -203,31 +193,27 @@ var theme = new MonacoTheme
203
193
204
194
`Rules` is an init-only property and must be provided during theme initialization.
205
195
206
-
When using `ThemeBehavior`, token styling can also be supplied via its `Rules` property, allowing rule customization alongside DevExpress theme integration.
196
+
If you use `ThemeBehavior`, token styling can also be supplied through its `Rules` property, and it allows rule customization alongside DevExpress theme integration.
207
197
208
198
## Languages
209
199
210
200
`CodeEditor` supports both built-in Monaco languages and custom language registration.
211
201
212
-
---
213
-
214
202
### Built-in Languages
215
203
216
-
To use a built-in Monaco language, set the `EditorLanguage` property:
204
+
To use a built-in Monaco language, specify the `EditorLanguage` property:
217
205
218
206
```csharp
219
207
editor.EditorLanguage="csharp";
220
208
editor.EditorLanguage="javascript";
221
209
editor.EditorLanguage="json";
222
210
```
223
211
224
-
The value must match a language id supported by Monaco.
225
-
226
-
---
212
+
The value must match a language ID supported in Monaco Editor.
227
213
228
214
### Custom Languages
229
215
230
-
Custom languages are registered using `LanguageDescriptor`.
216
+
You can register custom languages using `LanguageDescriptor`:
Copy file name to clipboardExpand all lines: CS/CodeEditor/Docs/ThemeBehavior.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ Behavior that automatically synchronizes Monaco Editor theme with DevExpress Lig
7
7
## Properties
8
8
9
9
| Name | Type | Description |
10
-
|------|------|-------------|
10
+
|----|----|-----------|
11
11
|`ApplyDevExpressColors`|`bool`| Gets or sets whether DevExpress palette colors are applied to Monaco Editor UI elements (background, foreground, selection, line numbers, scrollbar, brackets). This is a dependency property. Default: `true`|
12
12
|`Rules`|`IReadOnlyList<MonacoThemeRule>?`| Gets or sets optional syntax token style rules (keywords, comments, strings). This is a dependency property. |
13
13
14
14
## Static Methods
15
15
16
16
| Name | Description |
17
-
|------|-------------|
17
+
|----|-----------|
18
18
|`CreateFromDXTheme(string, IReadOnlyList<MonacoThemeRule>?, bool)`| Creates a `MonacoTheme` from a DevExpress theme name with optional rules and color mapping. |
19
-
|`GetColor(string)`| Retrieves a color from the current DevExpress theme palette by color key. Returns null if color not found. |
19
+
|`GetColor(string)`| Retrieves a color from the current DevExpress theme palette by color key. Returns `null` if color is not found. |
0 commit comments