TextRangeUnit TextRangeUnit TextRangeUnit TextRangeUnit TextRangeUnit Enum


Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
Specifies the units to use when navigating a text range.

public : enum class TextRangeUnit
enum class winrt::Windows::UI::Text::TextRangeUnit : int32_t
public enum TextRangeUnit
Public Enum TextRangeUnit
var value = Windows.UI.Text.TextRangeUnit.allCaps;
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


AllCaps AllCaps AllCaps AllCaps AllCaps

Text in all uppercase.

Bold Bold Bold Bold Bold

Bold text.

Character Character Character Character Character

A single character.

CharacterFormat CharacterFormat CharacterFormat CharacterFormat CharacterFormat

A text run of characters that all have identical character formatting properties.

Cluster Cluster Cluster Cluster Cluster

A complex-script cluster (occurs, for example, in Indic scripts).

Prerelease. ContentLink text.

Disabled Disabled Disabled Disabled Disabled

Disabled text.

FontBound FontBound FontBound FontBound FontBound

Text is in a font-bound font. That is, characters that can't be displayed with the current font were assigned a different font that could display the characters.

HardParagraph HardParagraph HardParagraph HardParagraph HardParagraph

A paragraph that is ended by a carriage return (CR) or carriage return/line feed (CR/LF).

Hidden Hidden Hidden Hidden Hidden

Hidden text.

Imprint Imprint Imprint Imprint Imprint

Imprinted (engraved) text.

Italic Italic Italic Italic Italic

Italic text.

Line Line Line Line Line

A single line of text on a display, provided that the display is associated with the range. If no display is associated with a range, Line is treated as Paragraph. A selection automatically has a display.

Hyperlink text.

LinkProtected LinkProtected LinkProtected LinkProtected LinkProtected

Characters in one or more contiguous, friendly-name hyperlinks. To work with single links that might be adjacent, use the Link unit.

Object Object Object Object Object

An embedded object.

Outline Outline Outline Outline Outline

Outline text.

Paragraph Paragraph Paragraph Paragraph Paragraph

A string of text terminated by an end-of-paragraph mark, such as carriage return/line feed (CR/LF), carriage return (CR), vertical tab(VT), line feed (LF), form feed (FF), or the Unicode paragraph separator (0x2029).

ParagraphFormat ParagraphFormat ParagraphFormat ParagraphFormat ParagraphFormat

A text run of characters that all have identical paragraph formatting properties.

ProtectedText ProtectedText ProtectedText ProtectedText ProtectedText

Protected text.

Revised Revised Revised Revised Revised

Revised text.

Screen Screen Screen Screen Screen

The contents of a screen. Typically, a screen is the amount of content associated with the Page Up or Page Down key.

Section Section Section Section Section

A section.

Sentence Sentence Sentence Sentence Sentence

A string of text that meets the following criteria:

  • Ends with a period, question mark, or exclamation mark.
  • Is followed by one or more ASCII white space characters (9 through 0xd and 0x20), or the Unicode paragraph separator (0x2029). The trailing white space is part of the sentence.
  • The last sentence in a story does not need to have a period, question mark, or exclamation mark.
  • Other sentences must follow a sentence end and cannot begin with a period, question mark, or exclamation mark.
  • The start of a story qualifies as the start of a Sentence, even if the string there doesn't qualify as a sentence grammatically.
Shadow Shadow Shadow Shadow Shadow

Shadow text.

SmallCaps SmallCaps SmallCaps SmallCaps SmallCaps

Text in small caps.

Story Story Story Story Story

A story, which is a contiguous range of text in a document. For example, a story can contain one of the various parts of a document, such as the main text of a document, headers and footers, footnotes, or annotations. In a rich edit control, there is only one story per document, although a client can use multiple documents to represent multiple stories.

Strikethrough Strikethrough Strikethrough Strikethrough Strikethrough

Strikethrough text.

Subscript Subscript Subscript Subscript Subscript

Text in the subscript character format.

Superscript Superscript Superscript Superscript Superscript

Text in the superscript character format.

Underline Underline Underline Underline Underline

Underlined text.

Window Window Window Window Window

The characters between the upper-left and lower-right corners of the window.

Word Word Word Word Word

A span of alphanumeric characters, an end of paragraph, or punctuation that includes any blanks that follow.

See Also