Back to API Reference
Enum

TextUnit

Granularity a stretch of text is counted and stepped in.

Remarks

Every unit but Line is a property of the text; Line is a property of the current wrap and therefore changes with the box, the font size and every other layout input.
public static readonly TextUnit Cluster = 0

One grapheme cluster — a user-perceived character.

public static readonly TextUnit Word = 1

One word as UAX #29 and the configured dictionaries segment it, carrying the spaces and punctuation that trail it.

public static readonly TextUnit Line = 2

One line of the current wrap, so the step follows the box the text is laid out in.

public static readonly TextUnit Paragraph = 3

One paragraph — the text between hard breaks, whatever the wrap does to it.