TextRangeUnit Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the units to use when navigating a text range.
public enum class TextRangeUnit
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class TextRangeUnit
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum TextRangeUnit
var value = Windows.UI.Text.TextRangeUnit.character
Public Enum TextRangeUnit
- Inheritance
-
TextRangeUnit
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Fields
Name | Value | Description |
---|---|---|
Character | 0 | A single character. |
Word | 1 | A span of alphanumeric characters, an end of paragraph, or punctuation that includes any blanks that follow. |
Sentence | 2 | A string of text that meets the following criteria:
|
Paragraph | 3 | 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). |
Line | 4 | 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 | 5 | 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 | 6 | The contents of a screen. Typically, a screen is the amount of content associated with the Page Up or Page Down key. |
Section | 7 | A section. |
Window | 8 | The characters between the upper-left and lower-right corners of the window. |
CharacterFormat | 9 | A text run of characters that all have identical character formatting properties. |
ParagraphFormat | 10 | A text run of characters that all have identical paragraph formatting properties. |
Object | 11 | An embedded object. |
HardParagraph | 12 | A paragraph that is ended by a carriage return (CR) or carriage return/line feed (CR/LF). |
Cluster | 13 | A complex-script cluster (occurs, for example, in Indic scripts). |
Bold | 14 | Bold text. |
Italic | 15 | Italic text. |
Underline | 16 | Underlined text. |
Strikethrough | 17 | Strikethrough text. |
ProtectedText | 18 | Protected text. |
Link | 19 | Hyperlink text. |
SmallCaps | 20 | Text in small caps. |
AllCaps | 21 | Text in all uppercase. |
22 | Hidden text. |
|
Outline | 23 | Outline text. |
Shadow | 24 | Shadow text. |
Imprint | 25 | Imprinted (engraved) text. |
Disabled | 26 | Disabled text. |
Revised | 27 | Revised text. |
Subscript | 28 | Text in the subscript character format. |
Superscript | 29 | Text in the superscript character format. |
FontBound | 30 | 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 | 31 | Characters in one or more contiguous, friendly-name hyperlinks. To work with single links that might be adjacent, use the Link unit. |
ContentLink | 32 | ContentLink text. |
Remarks
Version history
Windows version | SDK version | Value added |
---|---|---|
1803 | 17134 | ContentLink |
Applies to
See also
- HomeKey(TextRangeUnit, Boolean)
- EndKey(TextRangeUnit, Boolean)
- MoveLeft(TextRangeUnit, Int32, Boolean)
- MoveUp(TextRangeUnit, Int32, Boolean)
- MoveDown(TextRangeUnit, Int32, Boolean)
- MoveRight(TextRangeUnit, Int32, Boolean)
- Delete(TextRangeUnit, Int32)
- Expand(TextRangeUnit)
- StartOf(TextRangeUnit, Boolean)
- EndOf(TextRangeUnit, Boolean)
- Move(TextRangeUnit, Int32)
- MoveStart(TextRangeUnit, Int32)
- MoveEnd(TextRangeUnit, Int32)
- SetIndex(TextRangeUnit, Int32, Boolean)
- GetIndex(TextRangeUnit)