ITextStructureNavigator.GetSpanOfPreviousSibling Method

Gets the span of the previous sibling syntactic element of the specified snapshot span.

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

SnapshotSpan GetSpanOfPreviousSibling(
	SnapshotSpan activeSpan
)

Parameters

activeSpan
Type: Microsoft.VisualStudio.Text.SnapshotSpan

The SnapshotSpan from which to get the span of the previous sibling syntactic element.

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotSpan
A SnapshotSpan that represents the previous sibling syntactic element.

If the specified 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 previous element.

If the specified snapshot span covers a syntactic element that does not have a sibling element, then the behavior is the same as that of GetSpanOfEnclosing.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft