ITextView::GetTextElementSpan Method (SnapshotPoint)
Visual Studio 2015
Gets the SnapshotSpan of text that constitutes a text element (a single visual representation) at the given SnapshotPoint.
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Parameters
- point
-
Type:
Microsoft.VisualStudio.Text::SnapshotPoint
The SnapshotPoint in the text snapshot at which to get the text element.
Return Value
Type: Microsoft.VisualStudio.Text::SnapshotSpanA SnapshotSpan containing the bounds of the text element.
| Exception | Condition |
|---|---|
| ArgumentException | point is from the wrong ITextBuffer. |
A text element may be a UTF-16 surrogate pair, consisting of a high surrogate character and a low surrogate character. If a point in the text buffer lies between a high surrogate character and a low surrogate character, the text element span will start at the high surrogate character and end at the low surrogate character.
Show: