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.

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