VirtualSnapshotPoint.TranslateTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TranslateTo(ITextSnapshot) |
Translates this point to the |
TranslateTo(ITextSnapshot, PointTrackingMode) |
Translates this point to the |
TranslateTo(ITextSnapshot)
Translates this point to the snapshot
.
public:
Microsoft::VisualStudio::Text::VirtualSnapshotPoint TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot);
public Microsoft.VisualStudio.Text.VirtualSnapshotPoint TranslateTo (Microsoft.VisualStudio.Text.ITextSnapshot snapshot);
member this.TranslateTo : Microsoft.VisualStudio.Text.ITextSnapshot -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Function TranslateTo (snapshot As ITextSnapshot) As VirtualSnapshotPoint
Parameters
- snapshot
- ITextSnapshot
The target snapshot.
Returns
The corresponding VirtualSnapshotPoint in snapshot
.
Exceptions
snapshot
is for an earlier snapshot.
Applies to
TranslateTo(ITextSnapshot, PointTrackingMode)
Translates this point to the snapshot
with the given tracking mode.
public:
Microsoft::VisualStudio::Text::VirtualSnapshotPoint TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, Microsoft::VisualStudio::Text::PointTrackingMode trackingMode);
public Microsoft.VisualStudio.Text.VirtualSnapshotPoint TranslateTo (Microsoft.VisualStudio.Text.ITextSnapshot snapshot, Microsoft.VisualStudio.Text.PointTrackingMode trackingMode);
member this.TranslateTo : Microsoft.VisualStudio.Text.ITextSnapshot * Microsoft.VisualStudio.Text.PointTrackingMode -> Microsoft.VisualStudio.Text.VirtualSnapshotPoint
Public Function TranslateTo (snapshot As ITextSnapshot, trackingMode As PointTrackingMode) As VirtualSnapshotPoint
Parameters
- snapshot
- ITextSnapshot
The target snapshot.
- trackingMode
- PointTrackingMode
The tracking mode to use.
Returns
The corresponding VirtualSnapshotPoint in snapshot
.
Exceptions
snapshot
is for an earlier snapshot.
Remarks
The tracking mode is relative to the virtual point, not the snapshot point. If the point is in virtual space, it will behave as if the underlying (non-virtual) point is always tracking positive, as any text inserted at the point (at the end of the line it is on) will still be inserted "before" the virtual point.