Skip to content

CodeEditor

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The one editable code field (request bodies): a monospace TextBox for typing, selecting, the caret and undo, with the same text drawn colored on top of it (JSON, XML, param.cgi key=value; the tokenizer and colors of CodeView). The colored layer follows the text box’s scrolling and never takes input. The text is shown exactly as typed (never re-indented); texts above CodeText.DefaultHighlightLimit characters are plain. Look from the theme: ui|CodeEditor, TextBox.codeEditorInput, TextBlock.codeEditorText.

public sealed class CodeEditor : Panel

Inherits Panel

Set them in XAML (<ui:CodeEditor Name="..." />) or bind them.

Name Type Description
Language CodeLanguage How the text is colored; Plain = no colors.
PlaceholderText string? Grey text while the field is empty.
Text string? The text (two-way).
CodeDocument Document { get; private set; }

What the colored layer shows right now (tests).

TextBox Input { get; }

The inner text box (tests, focus).