Gets the span whose text element span contains the given buffer position.
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
Parameters
bufferPosition
Type: Microsoft.VisualStudio.Text.SnapshotPointThe buffer position.
Return Value
Type: Microsoft.VisualStudio.Text.SnapshotSpan
The SnapshotSpan that corresponds to the given text element index.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentOutOfRangeException | bufferPosition does not correspond to a position on this line.  | 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.