Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the SnapshotSpan of text that constitutes a text element (a single visual representation) at the given SnapshotPoint.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaration
Function GetTextElementSpan ( _
point As SnapshotPoint _
) As SnapshotSpan
SnapshotSpan GetTextElementSpan(
SnapshotPoint point
)
SnapshotSpan GetTextElementSpan(
SnapshotPoint point
)
abstract GetTextElementSpan :
point:SnapshotPoint -> SnapshotSpan
function GetTextElementSpan(
point : SnapshotPoint
) : SnapshotSpan
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.SnapshotSpan
A SnapshotSpan containing the bounds of the text element.
Exceptions
Exception | Condition |
---|---|
ArgumentException | 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.
.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.