Back to API Reference
Class

LengthLimitBehavior

sealed
Inherits:InputBehavior

Caps the field length and publishes the cap for a counter to show. Excess input is truncated on a boundary (never splitting a surrogate pair, multi-byte codepoint, or grapheme cluster); input with no room left is rejected; deletions always pass. Unit chooses what a unit of length means — by default Graphemes, so a family emoji counts as one.

public int Limit{ get; set }

Maximum length in Unit; zero disables the cap.

public TextLengthUnit Unit{ get; set }

Unit used to measure Limit.

protected override void OnEnable()
protected override void OnDisable()