Share via


ITextSelection Interface

Definition

Represents the currently selected text of a document.

public interface class ITextSelection : ITextRange
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2798872356, 62095, 17162, 178, 207, 195, 67, 103, 30, 192, 233)]
struct ITextSelection : ITextRange
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2798872356, 62095, 17162, 178, 207, 195, 67, 103, 30, 192, 233)]
public interface ITextSelection : ITextRange
Public Interface ITextSelection
Implements ITextRange
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Interface inheritance

ITextSelection inherits ITextRange. Types that implement ITextSelection also implement the interface members of ITextRange.

Properties

Character

Gets or sets the first character of the text range; that is, the character associated with the StartPosition property.

(Inherited from ITextRange)
CharacterFormat

Gets or sets the character formatting attributes of the text range.

(Inherited from ITextRange)
EndPosition

Gets or sets the end character position of the text range.

(Inherited from ITextRange)
FormattedText

Gets or sets an ITextRange object with the formatted text of the specified range.

(Inherited from ITextRange)
Gravity

Gets or sets the gravity of the text range.

(Inherited from ITextRange)
Length

Gets the count of characters in the text range.

(Inherited from ITextRange)
Link

Gets or sets the URL text associated with a text range.

(Inherited from ITextRange)
Options

Gets and sets text selection options.

ParagraphFormat

Gets or sets the paragraph formatting attributes of the text range.

(Inherited from ITextRange)
StartPosition

Gets or sets the start position of the text range.

(Inherited from ITextRange)
StoryLength

Gets the count of characters in the story of the text range.

(Inherited from ITextRange)
Text

Gets or sets the plain text of the text range.

(Inherited from ITextRange)
Type

Retrieves the type of text selection.

Methods

CanPaste(Int32)

Determines whether the Clipboard contains content that can be pasted, using a specified format, into the current text range.

(Inherited from ITextRange)
ChangeCase(LetterCase)

Changes the case of letters in a text range.

(Inherited from ITextRange)
Collapse(Boolean)

Collapses the text range into a degenerate point at either the beginning or end of the range.

(Inherited from ITextRange)
Copy()

Copies the text of the text range to the Clipboard.

(Inherited from ITextRange)
Cut()

Moves the text of the text range to the Clipboard.

(Inherited from ITextRange)
Delete(TextRangeUnit, Int32)

Deletes text from the text range.

(Inherited from ITextRange)
EndKey(TextRangeUnit, Boolean)

Moves the insertion point or the active end of the text selection to the end of the specified unit, mimicking the functionality of the End key.

EndOf(TextRangeUnit, Boolean)

Moves or extends the text range to the end of the nearest specified text unit. The text range is moved or extended forward in the document.

(Inherited from ITextRange)
Expand(TextRangeUnit)

Expands a text range to completely contain any partial text units.

(Inherited from ITextRange)
FindText(String, Int32, FindOptions)

Searches for a particular text string in a range and, if found, selects the string.

(Inherited from ITextRange)
GetCharacterUtf32(UInt32, Int32)

Retrieves the Unicode Transformation Format (UTF)-32 character code of the character at the specified offset from the end of the text range.

(Inherited from ITextRange)
GetClone()

Creates a new object that is identical to this text range object.

(Inherited from ITextRange)
GetIndex(TextRangeUnit)

Retrieves the story index of the text unit (word, line, sentence, paragraph, and so on) at the starting character position of the text range.

(Inherited from ITextRange)
GetPoint(HorizontalCharacterAlignment, VerticalCharacterAlignment, PointOptions, Point)

Retrieves the screen coordinates of a particular location in the text range.

(Inherited from ITextRange)
GetRect(PointOptions, Rect, Int32)

Retrieves the bounding rectangle that encompasses the text range on the screen.

(Inherited from ITextRange)
GetText(TextGetOptions, String)

Retrieves the text in a text range according to the specified conversion flags.

(Inherited from ITextRange)
GetTextViaStream(TextGetOptions, IRandomAccessStream)

Retrieves the text in the text range according to the specified conversion flags, as a random access stream.

(Inherited from ITextRange)
HomeKey(TextRangeUnit, Boolean)

Moves the insertion point or the active end of the text selection to the home position, mimicking the functionality of the Home key.

InRange(ITextRange)

Determines whether this range is in or at the same text as a specified range.

(Inherited from ITextRange)
InsertImage(Int32, Int32, Int32, VerticalCharacterAlignment, String, IRandomAccessStream)

Inserts an image into this range.

(Inherited from ITextRange)
InStory(ITextRange)

Determines whether this range's story is the same as a specified range's story.

(Inherited from ITextRange)
IsEqual(ITextRange)

Determines whether this range has the same character positions and story as those of a specified range.

(Inherited from ITextRange)
MatchSelection()

Sets the start and end positions of this range to match the active selection.

(Inherited from ITextRange)
Move(TextRangeUnit, Int32)

Moves the insertion point forward or backward by the specified number of units. If the text range is nondegenerate, it is collapsed to an insertion point at the start or end position of the text range, depending on count, and then is moved.

(Inherited from ITextRange)
MoveDown(TextRangeUnit, Int32, Boolean)

Moves the insertion point or the active end of the text selection down, mimicking the functionality of the Down Arrow or Page Down key.

MoveEnd(TextRangeUnit, Int32)

Moves the end position of the text range.

(Inherited from ITextRange)
MoveLeft(TextRangeUnit, Int32, Boolean)

Moves the insertion point or the active end of the text selection to the left, mimicking the functionality of the Left Arrow key.

MoveRight(TextRangeUnit, Int32, Boolean)

Moves the insertion point or the active end of the text selection to the right, mimicking the functionality of the Right Arrow key.

MoveStart(TextRangeUnit, Int32)

Moves the start position of a text range.

(Inherited from ITextRange)
MoveUp(TextRangeUnit, Int32, Boolean)

Moves the insertion point or the active end of the text selection up, mimicking the functionality of the Up Arrow or Page Up keys.

Paste(Int32)

Pastes text from the Clipboard into the text range.

(Inherited from ITextRange)
ScrollIntoView(PointOptions)

Scrolls this text range into view.

(Inherited from ITextRange)
SetIndex(TextRangeUnit, Int32, Boolean)

Moves the text range to the specified unit of the story.

(Inherited from ITextRange)
SetPoint(Point, PointOptions, Boolean)

Changes the text range based on the specified point.

(Inherited from ITextRange)
SetRange(Int32, Int32)

Sets the endpoints of the text range to the specified values.

(Inherited from ITextRange)
SetText(TextSetOptions, String)

Replaces the text in the text range.

(Inherited from ITextRange)
SetTextViaStream(TextSetOptions, IRandomAccessStream)

Sets the text in the text range based on the contents of a random access stream.

(Inherited from ITextRange)
StartOf(TextRangeUnit, Boolean)

Moves or extends the text range to the start of the nearest specified text unit. The text range is moved or extended backward in the document.

(Inherited from ITextRange)
TypeText(String)

Enters text into the selection as if someone typed it.

Applies to

See also