SnapshotPoint::TranslateTo Method (ITextSnapshot^, PointTrackingMode)

 

Translates this snapshot point to a different snapshot of the same ITextBuffer.

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

public:
SnapshotPoint TranslateTo(
	ITextSnapshot^ targetSnapshot,
	PointTrackingMode trackingMode
)

Parameters

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

The snapshot to which to translate.

trackingMode
Type: Microsoft.VisualStudio.Text::PointTrackingMode

The PointTrackingMode to use in the translation.

Return Value

Type: Microsoft.VisualStudio.Text::SnapshotPoint

A new snapshot point that has been mapped to the requested snapshot.

Exception Condition
ArgumentNullException

targetSnapshot is null.

ArgumentException

targetSnapshot does not refer to the same ITextBuffer as this snapshot point.

Return to top
Show: