TextRangeUnit enumeration

Applies to Windows and Windows Phone

Specifies the units to use when navigating a text range.

Syntax


public enum TextRangeUnit

Attributes

[Version(0x06020000)]

Members

The TextRangeUnit enumeration has these members.

MemberValueDescription
Character | character0

A single character.

Word | word1

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

Sentence | sentence2

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.
Paragraph | paragraph3

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

Line | line4

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.

Story | story5

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.

Screen | screen6

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

Section | section7

A section.

Window | window8

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

CharacterFormat | characterFormat9

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

ParagraphFormat | paragraphFormat10

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

Object | object11

An embedded object.

HardParagraph | hardParagraph12

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

Cluster | cluster13

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

Bold | bold14

Bold text.

Italic | italic15

Italic text.

Underline | underline16

Underlined text.

Strikethrough | strikethrough17

Strikethrough text.

ProtectedText | protectedText18

Protected text.

Link | link19

Hyperlink text.

SmallCaps | smallCaps20

Text in small caps.

AllCaps | allCaps21

Text in all uppercase.

Hidden | hidden22

Hidden text.

Outline | outline23

Outline text.

Shadow | shadow24

Shadow text.

Imprint | imprint25

Imprinted (engraved) text .

Disabled | disabled26

Disabled text.

Revised | revised27

Revised text.

Subscript | subscript28

Text in the subscript character format.

Superscript | superscript29

Text in the superscript character format.

FontBound | fontBound30

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.

LinkProtected | linkProtected31

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

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

See also

ITextSelection.HomeKey
ITextSelection.EndKey
ITextSelection.MoveLeft
ITextSelection.MoveUp
ITextSelection.MoveDown
ITextSelection.MoveRight
ITextRange.Delete
ITextRange.Expand
ITextRange.StartOf
ITextRange.EndOf
ITextRange.Move
ITextRange.MoveStart
ITextRange.MoveEnd
ITextRange.SetIndex
ITextRange.GetIndex

 

 

Show:
© 2014 Microsoft