ITextRange, interface
TOC
Réduire la table des matières
Développer la table des matières

ITextRange Interface

Représente une plage de texte continu dans un document, et fournit de puissantes propriétés et méthodes de modification et de liaison de données qui permettent à une application de sélectionner, d'examiner et de modifier le texte d'un document.

Syntaxe


public interface ITextRange

Attributs

[Version(0x06020000)]
[WebHostHidden()]

Membres

ITextRangeInterface possède ces types de membres :

Méthodes

The ITextRange Interface a les méthodes suivantes. Elle hérite également des méthodes de Object Classe.

MéthodeDescription
CanPaste Determines whether the Clipboard contains content that can be pasted, using a specified format, into the current text range.
ChangeCase Changes the case of letters in a text range.
Collapse Collapses the text range into a degenerate point at either the beginning or end of the range.
Copy Copies the text of the text range to the Clipboard.
Cut Moves the text of the text range to the Clipboard.
Delete Deletes text from the text range.
EndOf 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.
Expand Expands a text range to completely contain any partial text units.
FindText Searches for a particular text string in a range and, if found, selects the string.
GetCharacterUtf32 Retrieves the Unicode Transformation Format (UTF)-32 character code of the character at the specified offset from the end of the text range.
GetClone Creates a new object that is identical to this text range object.
GetIndex Retrieves the story index of the text unit (word, line, sentence, paragraph, and so on) at the starting character position of the text range.
GetPoint Retrieves the screen coordinates of a particular location in the text range.
GetRect Retrieves the bounding rectangle that encompasses the text range on the screen.
GetText Retrieves the text in a text range according to the specified conversion flags.
GetTextViaStream Retrieves the text in the text range according to the specified conversion flags, as a random access stream.
InRange Determines whether this range is in or at the same text as a specified range.
InsertImage Inserts an image into this range.
InStory Determines whether this range's story is the same as a specified range's story.
IsEqual Determines whether this range has the same character positions and story as those of a specified range.
MatchSelection Sets the start and end positions of this range to match the active selection.
Move 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.
MoveEnd Moves the end position of the text range.
MoveStart Moves the start position of a text range.
Paste Pastes text from the Clipboard into the text range.
ScrollIntoView Scrolls this text range into view.
SetIndex Moves the text range to the specified unit of the story.
SetPoint Changes the text range based on the specified point.
SetRange Sets the endpoints of the text range to the specified values.
SetText Replaces the text in the text range.
SetTextViaStream Sets the text in the text range based on the contents of a random access stream.
StartOf 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.

 

Propriétés

Le ITextRangeInterface a les propriétés suivantes.

PropriétéType d'accèsDescription

Character

Lecture/écritureGets or sets the first character of the text range; that is, the character associated with the StartPosition property.

CharacterFormat

Lecture/écritureGets or sets the character formatting attributes of the text range.

EndPosition

Lecture/écritureGets or sets the end character position of the text range.

FormattedText

Lecture/écritureGets or sets an ITextRange object with the formatted text of the specified range.

Gravity

Lecture/écritureGets or sets the gravity of the text range.

Length

En lecture seuleGets the count of characters in the text range.

Link

Lecture/écritureGets or sets the URL text associated with a text range.

ParagraphFormat

Lecture/écritureGets or sets the paragraph formatting attributes of the text range.

StartPosition

Lecture/écritureGets or sets the start position of the text range.

StoryLength

En lecture seuleGets the count of characters in the story of the text range.

Text

Lecture/écritureGets or sets the plain text of the text range.

 

Conditions requises

Client minimal pris en charge

Windows 8

Serveur minimal pris en charge

Windows Server 2012

Espace de noms

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

Métadonnées

Windows.winmd

 

 

Afficher:
© 2016 Microsoft