SnapshotPoint::TranslateTo Method (ITextSnapshot^, PointTrackingMode)
Visual Studio 2015
Translates this snapshot point to a different snapshot of the same ITextBuffer.
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::SnapshotPointA 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. |
Show: