TextField

A single-line text input.
public class TextField : 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; }

ClearButton

When the field shows its built-in clear button.

Clearing preserves focus and updates Text and TextChanged.

Type: ClearButton

public ClearButton ClearButton { get; set; }

ContentKind

What the field holds, so the system can offer autofill (passwords, one-time codes, contacts).

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; }

Keyboard

Which on-screen keyboard to show while editing.

Type: KeyboardType

public KeyboardType Keyboard { 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; }

LeadingIcon

The local icon shown before the text, or null for none.

Type: Bindable<ImageSource?>

public Bindable<ImageSource?> LeadingIcon { 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; }

Placeholder

Placeholder text shown when empty.

Type: Bindable<string?>

public Bindable<string?> Placeholder { get; set; }

RequiresText

Whether the return key is disabled while the field is empty.

Type: bool

public bool RequiresText { get; set; }

ReturnKey

The label shown on the keyboard's return key.

Type: ReturnKeyType

public ReturnKeyType ReturnKey { get; set; }

SubmitCommand

Command invoked when the user taps the keyboard's return key.

Type: ICommand?

public ICommand? SubmitCommand { get; set; }

SubmitCommandParameter

The parameter passed to SubmitCommand.

Type: object?

public object? SubmitCommandParameter { 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; }

TrailingIcon

The local icon shown after the text, or null for none.

Shares the trailing slot with ClearButton, so an icon hides the clear button.

Type: Bindable<ImageSource?>

public Bindable<ImageSource?> TrailingIcon { get; set; }