Skip to main content

CoerceText Method

Coerces the current text.

Definition​

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

protected virtual string? CoerceText(
string? value
)

Parameters​

  String
The initial text.

Return Value​

String
A coerced text.

Remarks​

This method also manages the internal undo/redo state whenever the text changes: if overridden, ensure that the base is called or undo/redo won't work correctly.

See Also​

Reference​

TextBox Class
Avalonia.Controls Namespace