ITextView.GetTextElementSpan(SnapshotPoint) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the SnapshotSpan of text that constitutes a text element (a single visual representation) at the given SnapshotPoint.
public:
Microsoft::VisualStudio::Text::SnapshotSpan GetTextElementSpan(Microsoft::VisualStudio::Text::SnapshotPoint point);
public Microsoft.VisualStudio.Text.SnapshotSpan GetTextElementSpan (Microsoft.VisualStudio.Text.SnapshotPoint point);
abstract member GetTextElementSpan : Microsoft.VisualStudio.Text.SnapshotPoint -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function GetTextElementSpan (point As SnapshotPoint) As SnapshotSpan
Parameters
- point
- SnapshotPoint
The SnapshotPoint in the text snapshot at which to get the text element.
Returns
A SnapshotSpan containing the bounds of the text element.
Exceptions
point
is from the wrong
ITextBuffer.
Remarks
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.