Back to API Reference
Class

CharacterCounterDecorator

sealed

Shows the current length — count, or count/limit when a LengthLimitBehavior publishes a cap — counting in the cap's TextLengthUnit (grapheme clusters when there is no cap), and recolors once the count reaches the limit. Counts the document SOURCE — the same space LengthLimitBehavior enforces in, so count and cap always agree; in a field with hidden markup the count therefore includes the markup characters, not just the visible text.

public UniTextBase Target{ get; set }

Text component that displays the current count and optional limit.

public Color OverflowColor{ get; set }

Colour applied when the count reaches the active limit.

protected override void OnAttach()
protected override void OnDetach()
protected override void OnFieldState()