ITextStructureNavigator.GetExtentOfWord Method (SnapshotPoint)

 

Gets the extent of the word at the given position.

Namespace:   Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

TextExtent GetExtentOfWord(
	SnapshotPoint currentPosition
)

Parameters

currentPosition
Type: Microsoft.VisualStudio.Text.SnapshotPoint

The text position.

Return Value

Type: Microsoft.VisualStudio.Text.Operations.TextExtent

A TextExtent that represents the word.

IsSignificant should be set to false for words consisting only of whitespace, unless the whitespace is a significant part of the document. If the returned extent consists only of insignificant whitespace, it should include all of the adjacent whitespace, including newline characters, spaces, and tabs.

Return to top
Show: