TextEditor

Edit multi-line text with keyboard traits and custom keyboard accessories.

TextEditor is the multi-line input control. Give it a useful height or let a parent layout provide one; unlike a short text field, an editor normally needs visible room for several lines.

var notes = new TextEditor
{
    Height = 180,
    Capitalization = Capitalization.Sentences,
    Autocorrection = true,
    KeyboardToolbar = KeyboardToolbar.Done,
    Text = Bind(vm => vm.Notes)
        .TwoWay((vm, val) => vm.Notes = val)
};

The example uses a two-way Text binding. TextChanged is useful for view-local counters or formatting indicators:

notes.TextChanged = value =>
{
    count.Text = $"{value.Length} / 500";
};

The editor exposes ContentKind, Capitalization, Autocorrection, and KeyboardLook, plus font size, weight, and design. It does not provide a single-line return submission command because return inserts a new line.

Keyboard accessories

Set KeyboardToolbar for a standard Done bar. Set KeyboardAccessory when the workflow needs custom formatting or insertion controls; it takes precedence over the toolbar.

notes.KeyboardAccessory = new StackPanel
{
    Orientation = Orientation.Horizontal,
    Spacing = 8,
    Padding = new Thickness(12, 8),
    Children =
    {
        new Button { Text = "Checklist", Command = viewModel.InsertChecklistCommand },
        new Button { Text = "Timestamp", Command = viewModel.InsertTimestampCommand }
    }
};

Treat maximum length and required content as model validation. A character counter improves feedback, but the save path should still reject invalid values.

Use TextField when return should submit rather than insert a new line.