共用方式為


ITextViewLineCollection.GetCharacterBounds 方法

取得指定之文字緩衝區位置的文字範圍。

命名空間:  Microsoft.VisualStudio.Text.Editor
組件:  Microsoft.VisualStudio.Text.UI (在 Microsoft.VisualStudio.Text.UI.dll 中)

語法

'宣告
Function GetCharacterBounds ( _
    bufferPosition As SnapshotPoint _
) As TextBounds
TextBounds GetCharacterBounds(
    SnapshotPoint bufferPosition
)
TextBounds GetCharacterBounds(
    SnapshotPoint bufferPosition
)
abstract GetCharacterBounds : 
        bufferPosition:SnapshotPoint -> TextBounds
function GetCharacterBounds(
    bufferPosition : SnapshotPoint
) : TextBounds

參數

傳回值

類型:Microsoft.VisualStudio.Text.Formatting.TextBounds
矩形 TextBounds 結構。

例外狀況

例外狀況 條件
ArgumentOutOfRangeException

bufferPosition沒有對應到在此線路上的位置。

.NET Framework 安全性

請參閱

參考

ITextViewLineCollection 介面

Microsoft.VisualStudio.Text.Editor 命名空間