IWpfTextViewLineCollection.GetTextViewLineContainingBufferPosition 方法
取得 IWpfTextViewLine,其包含指定的文字緩衝區位置。
命名空間: Microsoft.VisualStudio.Text.Editor
組件: Microsoft.VisualStudio.Text.UI.Wpf (在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)
語法
'宣告
Function GetTextViewLineContainingBufferPosition ( _
bufferPosition As SnapshotPoint _
) As IWpfTextViewLine
IWpfTextViewLine GetTextViewLineContainingBufferPosition(
SnapshotPoint bufferPosition
)
IWpfTextViewLine^ GetTextViewLineContainingBufferPosition(
SnapshotPoint bufferPosition
)
abstract GetTextViewLineContainingBufferPosition :
bufferPosition:SnapshotPoint -> IWpfTextViewLine
function GetTextViewLineContainingBufferPosition(
bufferPosition : SnapshotPoint
) : IWpfTextViewLine
參數
bufferPosition
類型:Microsoft.VisualStudio.Text.SnapshotPoint用來搜尋文字行的文字緩衝區位置。
傳回值
類型:Microsoft.VisualStudio.Text.Formatting.IWpfTextViewLine
ITextViewLine 所包含的位置,或nullnull 參考 (即 Visual Basic 中的 Nothing)如果不存在。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentOutOfRangeException | bufferPosition不正確的緩衝區位置。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。