Share via


ITextStructureNavigator.GetSpanOfFirstChild(SnapshotSpan) Method

Definition

Gets the span of the first child syntactic element of the specified snapshot span. If the snapshot span has zero length, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).

public:
 Microsoft::VisualStudio::Text::SnapshotSpan GetSpanOfFirstChild(Microsoft::VisualStudio::Text::SnapshotSpan activeSpan);
Microsoft::VisualStudio::Text::SnapshotSpan GetSpanOfFirstChild(Microsoft::VisualStudio::Text::SnapshotSpan activeSpan);
public Microsoft.VisualStudio.Text.SnapshotSpan GetSpanOfFirstChild (Microsoft.VisualStudio.Text.SnapshotSpan activeSpan);
abstract member GetSpanOfFirstChild : Microsoft.VisualStudio.Text.SnapshotSpan -> Microsoft.VisualStudio.Text.SnapshotSpan
Public Function GetSpanOfFirstChild (activeSpan As SnapshotSpan) As SnapshotSpan

Parameters

activeSpan
SnapshotSpan

The SnapshotSpan from which to get the span of the first child syntactic element.

Returns

A SnapshotSpan that represents the first child syntactic element. If the specified snapshot span covers multiple syntactic elements, then this method returns the span of the least common ancestor of the elements. If the specified snapshot span covers the child element, then the behavior is the same as that of GetSpanOfEnclosing(SnapshotSpan).

Remarks

If the snapshot span has zero length, then the behavior is the same as that of GetSpanOfEnclosing.

If the specified snapshot span covers multiple syntactic elements, then this method returns the span of the least common ancestor of the elements. If the specified snapshot span covers the child element, then the behavior is the same as that of GetSpanOfEnclosing.

Applies to