Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
targetSnapshot
Type: Microsoft.VisualStudio.Text.ITextSnapshotThe snapshot to which to translate.
trackingMode
Type: Microsoft.VisualStudio.Text.PointTrackingModeThe PointTrackingMode to use in the translation.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.