ITextViewLineCollection::GetTextElementSpan Method (SnapshotPoint)

 

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)

SnapshotSpan GetTextElementSpan(
	SnapshotPoint bufferPosition
)

Parameters

bufferPosition
Type: Microsoft.VisualStudio.Text::SnapshotPoint

The buffer position.

Return Value

Type: Microsoft.VisualStudio.Text::SnapshotSpan

The SnapshotSpan that corresponds to the given text element index.

Exception Condition
ArgumentOutOfRangeException

bufferPosition does not correspond to a position on this line.

Return to top
Show: