Freigeben über


ITextStructureNavigator.GetExtentOfWord(SnapshotPoint) Method

Definition

Gets the extent of the word at the given position.

public:
 Microsoft::VisualStudio::Text::Operations::TextExtent GetExtentOfWord(Microsoft::VisualStudio::Text::SnapshotPoint currentPosition);
public Microsoft.VisualStudio.Text.Operations.TextExtent GetExtentOfWord (Microsoft.VisualStudio.Text.SnapshotPoint currentPosition);
abstract member GetExtentOfWord : Microsoft.VisualStudio.Text.SnapshotPoint -> Microsoft.VisualStudio.Text.Operations.TextExtent
Public Function GetExtentOfWord (currentPosition As SnapshotPoint) As TextExtent

Parameters

currentPosition
SnapshotPoint

The text position anywhere in the word for which a TextExtent is needed.

Returns

A TextExtent that represents the word. The IsSignificant field is set to false for whitespace or other insignificant characters that should be ignored during navigation.

Remarks

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.

Applies to