Share via


TextPointer.GetTextRunLength(LogicalDirection) メソッド

定義

現在の TextPointer と、指定された論理方向の次のテキスト以外のシンボルとの間にある Unicode 文字の数を返します。

public:
 int GetTextRunLength(System::Windows::Documents::LogicalDirection direction);
public int GetTextRunLength (System.Windows.Documents.LogicalDirection direction);
member this.GetTextRunLength : System.Windows.Documents.LogicalDirection -> int
Public Function GetTextRunLength (direction As LogicalDirection) As Integer

パラメーター

direction
LogicalDirection

文字数をカウントする論理方向を指定する LogicalDirection 値のいずれか。

戻り値

Int32

現在の TextPointer と次のテキスト以外のシンボルとの間にある Unicode 文字の数。 隣接するテキストがない場合は 0 になります。

注釈

次のいずれかをシンボルと見なします。

  • 要素の開始タグまたは終了タグ TextElement

  • または UIElement BlockUIContainer. にInlineUIContainer含まれる要素。 このような a UIElement は常に 1 つのシンボルとしてカウントされ、そのシンボルに UIElement 含まれる追加のコンテンツまたは要素はシンボルとしてカウントされないことに注意してください。

  • テキスト Run 要素内の 16 ビット Unicode 文字。

適用対象