Freigeben über


SnapshotPoint.TranslateTo Method

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)

Syntax

'Declaration
Public Function TranslateTo ( _
    targetSnapshot As ITextSnapshot, _
    trackingMode As PointTrackingMode _
) As SnapshotPoint
public SnapshotPoint TranslateTo(
    ITextSnapshot targetSnapshot,
    PointTrackingMode trackingMode
)
public:
SnapshotPoint TranslateTo(
    ITextSnapshot^ targetSnapshot, 
    PointTrackingMode trackingMode
)
member TranslateTo : 
        targetSnapshot:ITextSnapshot * 
        trackingMode:PointTrackingMode -> SnapshotPoint
public function TranslateTo(
    targetSnapshot : ITextSnapshot, 
    trackingMode : PointTrackingMode
) : SnapshotPoint

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.SnapshotPoint
A new snapshot point that has been mapped to the requested snapshot.

Exceptions

Exception Condition
ArgumentNullException

targetSnapshot is nulla null reference (Nothing in Visual Basic).

ArgumentException

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

.NET Framework Security

See Also

Reference

SnapshotPoint Structure

Microsoft.VisualStudio.Text Namespace