RichEditTextRange 類別

定義

代表 RichEditTextDocument中的連續文字範圍,並提供編輯和資料系結屬性和方法,讓應用程式能夠選取、檢查及變更檔內容。

public ref class RichEditTextRange sealed
public ref class RichEditTextRange sealed : ITextRange
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RichEditTextRange final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RichEditTextRange final : ITextRange
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RichEditTextRange
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RichEditTextRange : ITextRange
Public NotInheritable Class RichEditTextRange
Public NotInheritable Class RichEditTextRange
Implements ITextRange
繼承
Object Platform::Object IInspectable RichEditTextRange
屬性
實作

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)

屬性

Character

取得或設定文字範圍的第一個字元;也就是說,與 StartPosition 屬性相關聯的字元。

CharacterFormat

取得或設定文字範圍的字元格式屬性。

ContentLinkInfo

取得或設定這個文字範圍的內容連結資訊。

EndPosition

取得或設定文字範圍的結束字元位置。

FormattedText

取得或設定具有指定範圍之格式化文字的 ITextRange 物件。

Gravity

取得或設定文字範圍的重力。

Length

取得文字範圍中的字元計數。

Link

取得或設定與文字範圍相關聯的 URL 文字。

ParagraphFormat

取得或設定文字範圍的段落格式設定屬性。

StartPosition

取得或設定文字範圍的開始位置。

StoryLength

取得文字範圍本文中的字元計數。

Text

取得或設定文字範圍的純文字。

方法

CanPaste(Int32)

判斷剪貼簿是否包含可使用指定格式貼上至目前文字範圍的內容。

ChangeCase(LetterCase)

變更文字範圍中的字母大小寫。

Collapse(Boolean)

將文字範圍折迭成範圍開頭或結尾的變質點。

Copy()

將文字範圍的文字複製到剪貼簿。

Cut()

將文字範圍的文字移至剪貼簿。

Delete(TextRangeUnit, Int32)

從文字範圍中刪除文字。

EndOf(TextRangeUnit, Boolean)

將文字範圍移動或延伸至最接近指定文字單位的結尾。 文字範圍會在檔中向前移動或延伸。

Expand(TextRangeUnit)

展開文字範圍以完全包含任何部分文字單位。

FindText(String, Int32, FindOptions)

搜尋範圍中的特定文字字串,如果找到,則會選取字串。

GetCharacterUtf32(UInt32, Int32)

擷取從文字範圍結尾的指定位移處的 UTF (UTF) -32 字元碼 Unicode 轉換格式。

GetClone()

建立與這個文字範圍物件相同的新 物件。

GetIndex(TextRangeUnit)

擷取文字單位的本文索引, (字、行、句子、段落等) 文字範圍的起始字元位置。

GetPoint(HorizontalCharacterAlignment, VerticalCharacterAlignment, PointOptions, Point)

擷取文字範圍中特定位置的螢幕座標。

GetRect(PointOptions, Rect, Int32)

擷取包含螢幕上文字範圍的周框。

GetText(TextGetOptions, String)

根據指定的轉換旗標,擷取文字範圍中的文字。

GetTextViaStream(TextGetOptions, IRandomAccessStream)

根據指定的轉換旗標擷取文字範圍中的文字,做為隨機存取資料流程。

InRange(ITextRange)

判斷此範圍位於或與指定範圍相同的文字上。

InsertImage(Int32, Int32, Int32, VerticalCharacterAlignment, String, IRandomAccessStream)

將影像插入此範圍。

InStory(ITextRange)

判斷此範圍的本文是否與指定範圍的本文相同。

IsEqual(ITextRange)

判斷此範圍是否具有與指定範圍相同的字元位置和本文。

MatchSelection()

設定此範圍的開始和結束位置,以符合使用中的選取範圍。

Move(TextRangeUnit, Int32)

依指定的_unit_s數目向前或向後移動插入點。 如果文字範圍不產生,則會根據 計數折迭到文字範圍的開始或結束位置的插入點,然後移動。

MoveEnd(TextRangeUnit, Int32)

移動文字範圍的結束位置。

MoveStart(TextRangeUnit, Int32)

移動文字範圍的開始位置。

Paste(Int32)

將剪貼簿中的文字貼到文字範圍。

ScrollIntoView(PointOptions)

將此文字範圍捲動到檢視中。

SetIndex(TextRangeUnit, Int32, Boolean)

將文字範圍移至本文的指定單位。

SetPoint(Point, PointOptions, Boolean)

根據指定的點變更文字範圍。

SetRange(Int32, Int32)

將文字範圍的端點設定為指定的值。

SetText(TextSetOptions, String)

取代文字範圍中的文字。

SetTextViaStream(TextSetOptions, IRandomAccessStream)

根據隨機存取資料流程的內容,設定文字範圍中的文字。

StartOf(TextRangeUnit, Boolean)

將文字範圍移動或延伸至最接近指定文字單位的開頭。 文字範圍會在檔中往後移動或延伸。

適用於