Freigeben über


ITextViewLineCollection.GetTextElementSpan-Methode

Ruft die Spanne ab, deren Textelementspanne die angegebene Pufferposition enthält.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Declaration
Function GetTextElementSpan ( _
    bufferPosition As SnapshotPoint _
) As SnapshotSpan
SnapshotSpan GetTextElementSpan(
    SnapshotPoint bufferPosition
)
SnapshotSpan GetTextElementSpan(
    SnapshotPoint bufferPosition
)
abstract GetTextElementSpan : 
        bufferPosition:SnapshotPoint -> SnapshotSpan
function GetTextElementSpan(
    bufferPosition : SnapshotPoint
) : SnapshotSpan

Parameter

Rückgabewert

Typ: Microsoft.VisualStudio.Text.SnapshotSpan
Die SnapshotSpan, die dem angegebenen Textelementindex entspricht.

Ausnahmen

Ausnahme Bedingung
ArgumentOutOfRangeException

bufferPosition entspricht keiner Position in dieser Zeile.

.NET Framework-Sicherheit

Siehe auch

Referenz

ITextViewLineCollection Schnittstelle

Microsoft.VisualStudio.Text.Editor-Namespace