VirtualSnapshotPoint::TranslateTo Method (ITextSnapshot^, PointTrackingMode)
Visual Studio 2015
Translates this point to the specified text snapshot with the specified tracking mode.
Assembly: Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)
public:
VirtualSnapshotPoint TranslateTo(
ITextSnapshot^ snapshot,
PointTrackingMode trackingMode
)
Parameters
- snapshot
-
Type:
Microsoft.VisualStudio.Text::ITextSnapshot^
The target snapshot.
- trackingMode
-
Type:
Microsoft.VisualStudio.Text::PointTrackingMode
The tracking mode to use.
Return Value
Type: Microsoft.VisualStudio.Text::VirtualSnapshotPointThe corresponding VirtualSnapshotPoint in snapshot.
| Exception | Condition |
|---|---|
| ArgumentException | snapshot is for an earlier snapshot. |
The tracking mode is relative to the virtual point, not the snapshot point. If the point is in virtual space, it will behave as though the underlying (non-virtual) point were always tracking positive, because any text inserted at the point (at the end of the line it is on) will still be inserted "before" the virtual point.
Show: