TextEditor

A multi-line text input.
public class TextEditor : Control

Properties

Autocorrection

Whether the keyboard autocorrects and spell-checks the input.

Type: bool

public bool Autocorrection { get; set; }

Capitalization

When typing is automatically capitalized.

Type: Capitalization

public Capitalization Capitalization { get; set; }

ContentKind

What the editor holds, so the system can offer autofill.

Type: ContentKind

public ContentKind ContentKind { get; set; }

FontDesign

The system font design the text uses.

Type: FontDesign

public FontDesign FontDesign { get; set; }

FontSize

Base font size in points, scaled by Dynamic Type.

Type: Bindable<double>

public Bindable<double> FontSize { get; set; }

FontWeight

The weight the text is drawn at.

Type: Bindable<FontWeight>

public Bindable<FontWeight> FontWeight { get; set; }

GrammarChecking

Whether iOS checks grammar while typing, or null to follow the system default.

iOS 27 and later.

Type: bool?

public bool? GrammarChecking { get; set; }

KeyboardAccessory

A custom view above the raised keyboard.

Wins over KeyboardToolbar; one view per field.

Type: View?

public View? KeyboardAccessory { get; set; }

KeyboardLook

The color scheme of the raised keyboard.

Type: KeyboardLook

public KeyboardLook KeyboardLook { get; set; }

KeyboardToolbar

A bar above the raised keyboard with Done and optional previous/next arrows.

Type: KeyboardToolbar

public KeyboardToolbar KeyboardToolbar { get; set; }

MaxFontSize

The largest point size Dynamic Type may produce, or NaN for no upper bound.

Set this and MinFontSize to the same value for fixed-size text.

Type: double

public double MaxFontSize { get; set; }

MinFontSize

The smallest point size Dynamic Type may produce, or NaN for no lower bound.

Type: double

public double MinFontSize { get; set; }

Text

The current text.

Type: Bindable<string>

public Bindable<string> Text { get; set; }

TextChanged

Invoked with the new value whenever the text changes.

Type: Action<string>?

public Action<string>? TextChanged { get; set; }

Methods

MeasureOverride

Content measurement. Panels recurse; controls delegate to the native SizeThatFits.

protected override Size MeasureOverride(
  Size availableSize)
ParameterSummary
Size availableSizeThe size available for the view's content.

Returns

  • Size: The desired content size.