TextBox.GetRectFromCharacterIndex メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したインデックス位置にある文字の端の四角形を返します。
オーバーロード
| 名前 | 説明 |
|---|---|
| GetRectFromCharacterIndex(Int32) |
指定したインデックス位置にある文字の先頭端の四角形を返します。 |
| GetRectFromCharacterIndex(Int32, Boolean) |
指定したインデックス位置にある文字の先頭または末尾の端の四角形を返します。 |
GetRectFromCharacterIndex(Int32)
指定したインデックス位置にある文字の先頭端の四角形を返します。
public:
System::Windows::Rect GetRectFromCharacterIndex(int charIndex);
public System.Windows.Rect GetRectFromCharacterIndex(int charIndex);
member this.GetRectFromCharacterIndex : int -> System.Windows.Rect
Public Function GetRectFromCharacterIndex (charIndex As Integer) As Rect
パラメーター
- charIndex
- Int32
四角形を取得する文字の 0 から始まる文字インデックス。
返品
指定した文字インデックスにある文字の先頭端の四角形。外接する四角形を特定できない場合は Empty 。
注釈
このメソッドは、文字の端を表す四角形を返すので、四角形の幅は 0 です。
適用対象
GetRectFromCharacterIndex(Int32, Boolean)
指定したインデックス位置にある文字の先頭または末尾の端の四角形を返します。
public:
System::Windows::Rect GetRectFromCharacterIndex(int charIndex, bool trailingEdge);
public System.Windows.Rect GetRectFromCharacterIndex(int charIndex, bool trailingEdge);
member this.GetRectFromCharacterIndex : int * bool -> System.Windows.Rect
Public Function GetRectFromCharacterIndex (charIndex As Integer, trailingEdge As Boolean) As Rect
パラメーター
- charIndex
- Int32
四角形を取得する文字の 0 から始まる文字インデックス。
- trailingEdge
- Boolean
true 文字の末尾の端を取得する場合。 false 文字の先頭端を取得します。
返品
指定した文字インデックスにある文字の端の四角形。外接する四角形を特定できない場合は Empty 。
例外
charIndex が負の値であるか、コンテンツの長さを超えています。
注釈
このメソッドは、文字の端を表す四角形を返すので、四角形の幅は 0 です。