Skip to content

Commit 0e34f8f

Browse files
Update CodeEditor docs formatting and wording
- 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
1 parent 3b39c07 commit 0e34f8f

4 files changed

Lines changed: 25 additions & 43 deletions

File tree

CS/CodeEditor/Docs/CodeEditor.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ WPF control that embeds Monaco Editor (VS Code editor) using WebView2 for code e
55
## Properties
66

77
| Name | Type | Description |
8-
|------|------|-------------|
8+
| ---- | ---- | ----------- |
99
| `Text` | `string` | Gets or sets editor text. This is a dependency property. Supports two-way binding. |
1010
| `EditorLanguage` | `string` | Gets or sets the programming language for syntax highlighting. This is a dependency property. Default: `"csharp"` |
1111
| `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. |
1313
| `ShowLineNumbers` | `bool` | Gets or sets whether line numbers are displayed. This is a dependency property. Default: `true` |
1414
| `LineNumbersMinChars` | `int` | Gets or sets the minimum number of character slots reserved for the line-number gutter. This is a dependency property. Default: `5` |
1515
| `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
1818
| `TabSize` | `int` | Gets or sets the tab size in spaces (1-64). This is a dependency property. Default: `4` |
1919
| `InsertSpaces` | `bool` | Gets or sets whether spaces are inserted instead of tabs. This is a dependency property. Default: `true` |
2020
| `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` |
2323
| `EnableScrollBeyondLastLine` | `bool` | Gets or sets whether scrolling beyond the last line is allowed. This is a dependency property. Default: `true` |
2424
| `ScrollBeyondLastColumn` | `int` | Gets or sets the number of columns to scroll beyond the last character. This is a dependency property. Default: `5` |
2525
| `EnableSmoothScrolling` | `bool` | Gets or sets whether smooth scrolling is enabled. This is a dependency property. Default: `false` |
2626
| `EnableStickyScroll` | `bool` | Gets or sets whether sticky scroll is enabled. This is a dependency property. Default: `true` |
2727
| `EnableContextMenu` | `bool` | Gets or sets whether the context menu is enabled. This is a dependency property. Default: `true` |
2828
| `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` |
3030
| `EnableQuickSuggestions` | `bool` | Gets or sets whether quick suggestions are enabled. This is a dependency property. Default: `true` |
3131
| `EnableWordBasedSuggestions` | `bool` | Gets or sets whether word-based suggestions are enabled. This is a dependency property. Default: `true` |
3232
| `EnableSuggestOnTriggerCharacters` | `bool` | Gets or sets whether suggestions appear automatically when typing trigger characters. This is a dependency property. Default: `true` |
3333
| `EnableParameterHints` | `bool` | Gets or sets whether parameter hints are displayed. This is a dependency property. Default: `true` |
3434
| `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. |
3636

3737
## Methods
3838

3939
| Name | Description |
40-
|------|-------------|
40+
| ---- | ----------- |
4141
| `GetAvailableLanguagesAsync(CancellationToken)` | Asynchronously retrieves a list of available programming language IDs. |
4242
| `RegisterLanguage(LanguageDescriptor)` | Registers a custom programming language with Monarch tokenizer. |
4343
| `RegisterTheme(MonacoTheme)` | Registers a custom Monaco Editor theme. |
44-
| `MarkAsSaved()` | Resets the IsModified property to false. |
44+
| `MarkAsSaved()` | Resets the `IsModified` property to `false`. |
4545
| `Dispose()` | Releases WebView2 resources. |
4646

4747
## Events
4848

4949
| Name | Description |
50-
|------|-------------|
50+
| ---- | ----------- |
5151
| `EditorInitialized` | Occurs when the Monaco Editor is fully initialized and ready for commands. |
5252

5353
## Enums
5454

5555
### EditorAutoIndent
5656

5757
| Member | Description |
58-
|--------|-------------|
58+
| ------ | ----------- |
5959
| `None` | No automatic indentation |
6060
| `Keep` | Keep current indentation |
6161
| `Brackets` | Indent based on brackets |
@@ -65,6 +65,6 @@ WPF control that embeds Monaco Editor (VS Code editor) using WebView2 for code e
6565
### EditorWordWrap
6666

6767
| Member | Description |
68-
|--------|-------------|
68+
| ------ | ----------- |
6969
| `Off` | No word wrapping |
7070
| `On` | Word wrapping enabled |

CS/CodeEditor/Docs/CodeEditorService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public interface ICodeEditorService {
1515
## Methods
1616

1717
| Name | Description |
18-
|------|-------------|
18+
| ---- | ----------- |
1919
| `MarkAsSaved()` | Resets the `IsModified` flag of the associated `CodeEditor` to `false`. |
2020
| `GetLanguagesAsync(CancellationToken)` | Asynchronously retrieves a collection of available programming language IDs from the associated `CodeEditor`. |
2121
| `RegisterLanguage(LanguageDescriptor)` | Registers a custom programming language with Monarch tokenizer in the associated `CodeEditor`. |

CS/CodeEditor/Docs/Overview.md

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
`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/).
44

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.
66

77
The primary editing surface is the `CodeEditor` control, which exposes a focused, WPF-friendly API.
88

9-
The library also provides:
9+
The library also includes:
1010

1111
- `ThemeBehavior` - integrates Monaco with DevExpress themes.
1212
- `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
3737
- Add project reference from your WPF app
3838
- Ensure DevExpress WPF and WebView2 dependencies are resolved
3939

40-
---
41-
4240
### 2. Declare the XML namespace
4341

4442
```xml
@@ -58,9 +56,7 @@ Add the `CodeEditor` project to your solution and reference it from your WPF app
5856
</Window>
5957
```
6058

61-
---
62-
63-
### 3. Provide a ViewModel
59+
### 3. Create a ViewModel
6460

6561
```csharp
6662
using DevExpress.Mvvm;
@@ -97,8 +93,6 @@ The editor content is automatically synchronized with the bound property.
9793

9894
`CodeEditor` supports built-in Monaco themes, DevExpress theme integration, and custom theme registration.
9995

100-
---
101-
10296
### Built-in Monaco Themes
10397

10498
You can use any of the standard Monaco themes:
@@ -111,8 +105,6 @@ editor.ThemeName = "hc-black";
111105

112106
These themes are provided by Monaco.
113107

114-
---
115-
116108
### DevExpress Theme Integration
117109

118110
By default, `CodeEditor` does not automatically track DevExpress theme changes.
@@ -146,8 +138,6 @@ xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
146138

147139
The theme is updated automatically when the DevExpress theme changes.
148140

149-
---
150-
151141
### Custom Themes
152142

153143
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
174164

175165
In addition to UI colors, Monaco themes support token-level styling via `Rules`.
176166

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.
178168

179169
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.
180170

@@ -203,31 +193,27 @@ var theme = new MonacoTheme
203193

204194
`Rules` is an init-only property and must be provided during theme initialization.
205195

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.
207197

208198
## Languages
209199

210200
`CodeEditor` supports both built-in Monaco languages and custom language registration.
211201

212-
---
213-
214202
### Built-in Languages
215203

216-
To use a built-in Monaco language, set the `EditorLanguage` property:
204+
To use a built-in Monaco language, specify the `EditorLanguage` property:
217205

218206
```csharp
219207
editor.EditorLanguage = "csharp";
220208
editor.EditorLanguage = "javascript";
221209
editor.EditorLanguage = "json";
222210
```
223211

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.
227213

228214
### Custom Languages
229215

230-
Custom languages are registered using `LanguageDescriptor`.
216+
You can register custom languages using `LanguageDescriptor`:
231217

232218
```csharp
233219
var language = new LanguageDescriptor
@@ -261,15 +247,13 @@ editor.RegisterLanguage(language);
261247
editor.EditorLanguage = "mylang";
262248
```
263249

264-
---
265-
266250
### Monarch Definition
267251

268252
The `Monarch` property defines the syntax highlighting rules.
269253

270-
It must contain a valid Monaco Monarch tokenizer definition provided as a JavaScript object literal.
254+
The property must contain a valid Monaco Monarch tokenizer definition specified as a JavaScript object literal.
271255

272-
All standard Monarch features are supported, including:
256+
All standard Monarch features are supported:
273257

274258
- Multiple states
275259
- Nested states
@@ -279,8 +263,6 @@ All standard Monarch features are supported, including:
279263

280264
Refer to the following topic for additional information: [Monarch Documentation](https://microsoft.github.io/monaco-editor/monarch.html)
281265

282-
---
283-
284266
### Language Configuration
285267

286268
The optional `Configuration` property defines editor behavior such as:

CS/CodeEditor/Docs/ThemeBehavior.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Behavior that automatically synchronizes Monaco Editor theme with DevExpress Lig
77
## Properties
88

99
| Name | Type | Description |
10-
|------|------|-------------|
10+
| ---- | ---- | ----------- |
1111
| `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` |
1212
| `Rules` | `IReadOnlyList<MonacoThemeRule>?` | Gets or sets optional syntax token style rules (keywords, comments, strings). This is a dependency property. |
1313

1414
## Static Methods
1515

1616
| Name | Description |
17-
|------|-------------|
17+
| ---- | ----------- |
1818
| `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

Comments
 (0)