VirtualSnapshotSpan::TranslateTo Method (ITextSnapshot^, SpanTrackingMode)

 

Translates this span to the specified snapshot with the given tracking mode.

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

public:
VirtualSnapshotSpan TranslateTo(
	ITextSnapshot^ snapshot,
	SpanTrackingMode trackingMode
)

Parameters

snapshot
Type: Microsoft.VisualStudio.Text::ITextSnapshot^

The target snapshot.

trackingMode
Type: Microsoft.VisualStudio.Text::SpanTrackingMode

The tracking mode.

Return Value

Type: Microsoft.VisualStudio.Text::VirtualSnapshotSpan

The corresponding VirtualSnapshotSpan in snapshot.

Exception Condition
ArgumentException

snapshot is for an earlier snapshot.

See TranslateTo for a description of how VirtualSnapshotPoint translation behaves.

Return to top
Show: