Aracılığıyla paylaş


SnapshotPoint.TranslateTo(ITextSnapshot, PointTrackingMode) Method

Definition

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

public:
 Microsoft::VisualStudio::Text::SnapshotPoint TranslateTo(Microsoft::VisualStudio::Text::ITextSnapshot ^ targetSnapshot, Microsoft::VisualStudio::Text::PointTrackingMode trackingMode);
public Microsoft.VisualStudio.Text.SnapshotPoint TranslateTo (Microsoft.VisualStudio.Text.ITextSnapshot targetSnapshot, Microsoft.VisualStudio.Text.PointTrackingMode trackingMode);
member this.TranslateTo : Microsoft.VisualStudio.Text.ITextSnapshot * Microsoft.VisualStudio.Text.PointTrackingMode -> Microsoft.VisualStudio.Text.SnapshotPoint
Public Function TranslateTo (targetSnapshot As ITextSnapshot, trackingMode As PointTrackingMode) As SnapshotPoint

Parameters

targetSnapshot
ITextSnapshot

The snapshot to which to translate.

trackingMode
PointTrackingMode

The PointTrackingMode to use in the translation.

Returns

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

Exceptions

targetSnapshot is null.

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

Applies to