Partilhar via


ITextViewLineCollection.GetTextElementSpan(SnapshotPoint) Method

Definition

Gets the span whose text element span contains the given buffer position.

public:
 Microsoft::VisualStudio::Text::SnapshotSpan GetTextElementSpan(Microsoft::VisualStudio::Text::SnapshotPoint bufferPosition);
public Microsoft.VisualStudio.Text.SnapshotSpan GetTextElementSpan (Microsoft.VisualStudio.Text.SnapshotPoint bufferPosition);
abstract member GetTextElementSpan : Microsoft.VisualStudio.Text.SnapshotPoint -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function GetTextElementSpan (bufferPosition As SnapshotPoint) As SnapshotSpan

Parameters

bufferPosition
SnapshotPoint

The buffer position.

Returns

The SnapshotSpan that corresponds to the given text element index.

Exceptions

bufferPosition does not correspond to a position on this line.

Applies to