RichTextBox.GetSpellingErrorRange(TextPointer) 方法

定義

傳回 TextRange 物件,其中涵蓋在 RichTextBox 的內容內指定之位置上的任何拼錯的字。

public:
 System::Windows::Documents::TextRange ^ GetSpellingErrorRange(System::Windows::Documents::TextPointer ^ position);
public System.Windows.Documents.TextRange GetSpellingErrorRange (System.Windows.Documents.TextPointer position);
member this.GetSpellingErrorRange : System.Windows.Documents.TextPointer -> System.Windows.Documents.TextRange
Public Function GetSpellingErrorRange (position As TextPointer) As TextRange

參數

position
TextPointer

TextPointer,指定位置和邏輯方向,這些會解析為字元,以檢查拼字錯誤。 使用這個 TextPointerLogicalDirection 屬性以指定要檢查之字元的方向。

傳回

TextRange

TextRange 物件會涵蓋包含在由 position 所指定之字元的任何拼錯的字,如果指定的字元沒有任何拼字錯誤,則設為 null

備註

TextPointer 通常 position 指定兩個字元之間的位置。 使用 的 LogicalDirection position 屬性來指定要檢查的字元。

適用於

另請參閱