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
 
要检索其边框的字符的字符索引,该索引从零开始。
返回
指定字符索引处字符的前边缘的边框;如果无法确定边框,则为 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
 
要检索其边框的字符的字符索引,该索引从零开始。
- trailingEdge
 - Boolean
 
如果获取字符的后边缘,则为 true;如果获取字符的前边缘,则为 false。
返回
指定字符索引处字符某个边缘的边框;如果无法确定边框,则为 Empty。
例外
              charIndex 为负,或大于内容的长度。
注解
由于此方法返回表示字符边缘的矩形,因此矩形的宽度为 0。