Skip to content

Commit 5b827b0

Browse files
Apply suggestions from code review
Co-authored-by: dirkpieterse <dirk.pieterse@devexpress.com>
1 parent 32486ca commit 5b827b0

2 files changed

Lines changed: 342 additions & 342 deletions

File tree

CS/CodeEditor/Docs/CodeEditor.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
# CodeEditor
2-
3-
WPF code editor control with syntax highlighting and other modern code display/navigation capabilities. This control embeds Monaco Editor (Visual Studio Code editor) using WebView2.
4-
5-
## Properties
6-
7-
| Name | Type | Description |
8-
| ---- | ---- | ----------- |
9-
| `Text` | `string` | Gets or sets the editor text. This is a dependency property. Supports two-way binding. |
10-
| `EditorLanguage` | `string` | Gets or sets the programming language for syntax highlighting. This is a dependency property. Default: `"csharp"` |
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 content has been modified since the last save. This is a readonly dependency property. |
13-
| `ShowLineNumbers` | `bool` | Gets or sets whether line numbers are displayed. This is a dependency property. Default: `true` |
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-
| `ShowMinimap` | `bool` | Gets or sets whether the minimap is displayed. This is a dependency property. Default: `false` |
16-
| `ShowGlyphMargin` | `bool` | Gets or sets whether the glyph margin is displayed. This is a dependency property. Default: `false` |
17-
| `EnableFolding` | `bool` | Gets or sets whether code folding is enabled. This is a dependency property. Default: `true` |
18-
| `TabSize` | `int` | Gets or sets the tab size in spaces (1-64). This is a dependency property. Default: `4` |
19-
| `InsertSpaces` | `bool` | Gets or sets whether spaces are inserted instead of tabs. This is a dependency property. Default: `true` |
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 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-
| `EnableScrollBeyondLastLine` | `bool` | Gets or sets whether scrolling beyond the last line is allowed. This is a dependency property. Default: `true` |
24-
| `ScrollBeyondLastColumn` | `int` | Gets or sets the number of columns to scroll beyond the last character. This is a dependency property. Default: `5` |
25-
| `EnableSmoothScrolling` | `bool` | Gets or sets whether smooth scrolling is enabled. This is a dependency property. Default: `false` |
26-
| `EnableStickyScroll` | `bool` | Gets or sets whether sticky scroll is enabled. This is a dependency property. Default: `true` |
27-
| `EnableContextMenu` | `bool` | Gets or sets whether the context menu is enabled. This is a dependency property. Default: `true` |
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 <kbd>Ctrl</kbd>+<kbd>MouseWheel</kbd> is enabled. This is a dependency property. Default: `false` |
30-
| `EnableQuickSuggestions` | `bool` | Gets or sets whether quick suggestions are enabled. This is a dependency property. Default: `true` |
31-
| `EnableWordBasedSuggestions` | `bool` | Gets or sets whether word-based suggestions are enabled. This is a dependency property. Default: `true` |
32-
| `EnableSuggestOnTriggerCharacters` | `bool` | Gets or sets whether suggestions appear automatically when typing trigger characters. This is a dependency property. Default: `true` |
33-
| `EnableParameterHints` | `bool` | Gets or sets whether parameter hints are displayed. This is a dependency property. Default: `true` |
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. |
36-
37-
## Methods
38-
39-
| Name | Description |
40-
| ---- | ----------- |
41-
| `GetAvailableLanguagesAsync(CancellationToken)` | Asynchronously retrieves a list of available programming language IDs. |
1+
# CodeEditor
2+
3+
A WPF code editor control with syntax highlighting and modern code display and navigation capabilities. The control embeds the Monaco Editor, the editor used in Visual Studio Code, through WebView2.
4+
5+
## Properties
6+
7+
| Name | Type | Description |
8+
| ---- | ---- | ----------- |
9+
| `Text` | `string` | Gets or sets the editor text. This is a dependency property that supports two-way binding. |
10+
| `EditorLanguage` | `string` | Gets or sets the programming language for syntax highlighting. This is a dependency property. Default: `"csharp"` |
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 content has been modified since the last save. This is a read-only dependency property. |
13+
| `ShowLineNumbers` | `bool` | Gets or sets whether line numbers are displayed. This is a dependency property. Default: `true` |
14+
| `LineNumbersMinChars` | `int` | Gets or sets the minimum number of characters reserved for the line-number gutter. This is a dependency property. Default: `5` |
15+
| `ShowMinimap` | `bool` | Gets or sets whether the minimap is displayed. This is a dependency property. Default: `false` |
16+
| `ShowGlyphMargin` | `bool` | Gets or sets whether the glyph margin is displayed. This is a dependency property. Default: `false` |
17+
| `EnableFolding` | `bool` | Gets or sets whether code folding is enabled. This is a dependency property. Default: `true` |
18+
| `TabSize` | `int` | Gets or sets the tab size in spaces (1-64). This is a dependency property. Default: `4` |
19+
| `InsertSpaces` | `bool` | Gets or sets whether spaces are inserted instead of tabs. This is a dependency property. Default: `true` |
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 word the wrap mode. This is a dependency property. Default: `EditorWordWrap.Off` |
23+
| `EnableScrollBeyondLastLine` | `bool` | Gets or sets whether scrolling beyond the last line is allowed. This is a dependency property. Default: `true` |
24+
| `ScrollBeyondLastColumn` | `int` | Gets or sets the number of columns the editor can scroll beyond the last character. This is a dependency property. Default: `5` |
25+
| `EnableSmoothScrolling` | `bool` | Gets or sets whether smooth scrolling is enabled. This is a dependency property. Default: `false` |
26+
| `EnableStickyScroll` | `bool` | Gets or sets whether sticky scroll is enabled. This is a dependency property. Default: `true` |
27+
| `EnableContextMenu` | `bool` | Gets or sets whether the context menu is enabled. This is a dependency property. Default: `true` |
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 <kbd>Ctrl</kbd>+<kbd>MouseWheel</kbd> is enabled. This is a dependency property. Default: `false` |
30+
| `EnableQuickSuggestions` | `bool` | Gets or sets whether quick suggestions are enabled. This is a dependency property. Default: `true` |
31+
| `EnableWordBasedSuggestions` | `bool` | Gets or sets whether word-based suggestions are enabled. This is a dependency property. Default: `true` |
32+
| `EnableSuggestOnTriggerCharacters` | `bool` | Gets or sets whether suggestions appear automatically when a user types trigger characters. This is a dependency property. Default: `true` |
33+
| `EnableParameterHints` | `bool` | Gets or sets whether parameter hints are displayed. This is a dependency property. Default: `true` |
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. |
36+
37+
## Methods
38+
39+
| Name | Description |
40+
| ---- | ----------- |
41+
| `GetAvailableLanguagesAsync(CancellationToken)` | Asynchronously retrieves a list of available programming language IDs. |
4242
| `RegisterLanguage(LanguageDescriptor)` | Registers a custom programming language with a Monarch tokenizer. |
43-
| `RegisterTheme(MonacoTheme)` | Registers a custom Monaco Editor theme. |
44-
| `MarkAsSaved()` | Resets the `IsModified` property to `false`. |
45-
| `Dispose()` | Releases WebView2 resources. |
46-
47-
## Events
48-
49-
| Name | Description |
50-
| ---- | ----------- |
51-
| `EditorInitialized` | Occurs when the Monaco Editor is fully initialized and ready for commands. |
52-
53-
## Enums
54-
55-
### EditorAutoIndent
56-
57-
| Member | Description |
58-
| ------ | ----------- |
59-
| `None` | No automatic indentation |
60-
| `Keep` | Keep current indentation |
61-
| `Brackets` | Indent based on brackets |
62-
| `Advanced` | Advanced indentation |
63-
| `Full` | Full automatic indentation (recommended) |
64-
65-
### EditorWordWrap
66-
67-
| Member | Description |
68-
| ------ | ----------- |
69-
| `Off` | No word wrapping |
70-
| `On` | Word wrapping enabled |
43+
| `RegisterTheme(MonacoTheme)` | Registers a custom Monaco Editor theme. |
44+
| `MarkAsSaved()` | Resets the `IsModified` property to `false`. |
45+
| `Dispose()` | Releases WebView2 resources. |
46+
47+
## Events
48+
49+
| Name | Description |
50+
| ---- | ----------- |
51+
| `EditorInitialized` | Occurs when the Monaco Editor is fully initialized and ready for commands. |
52+
53+
## Enums
54+
55+
### EditorAutoIndent
56+
57+
| Member | Description |
58+
| ------ | ----------- |
59+
| `None` | No automatic indentation |
60+
| `Keep` | Keep current indentation |
61+
| `Brackets` | Indent based on brackets |
62+
| `Advanced` | Advanced indentation |
63+
| `Full` | Full automatic indentation (recommended) |
64+
65+
### EditorWordWrap
66+
67+
| Member | Description |
68+
| ------ | ----------- |
69+
| `Off` | No word wrapping |
70+
| `On` | Word wrapping enabled |

0 commit comments

Comments
 (0)