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 span 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, _
    spanTrackingMode As SpanTrackingMode _
) As SnapshotSpan
public SnapshotSpan TranslateTo(
    ITextSnapshot targetSnapshot,
    SpanTrackingMode spanTrackingMode
)
public:
SnapshotSpan TranslateTo(
    ITextSnapshot^ targetSnapshot, 
    SpanTrackingMode spanTrackingMode
)
member TranslateTo : 
        targetSnapshot:ITextSnapshot * 
        spanTrackingMode:SpanTrackingMode -> SnapshotSpan 
public function TranslateTo(
    targetSnapshot : ITextSnapshot, 
    spanTrackingMode : SpanTrackingMode
) : SnapshotSpan
Parameters
- targetSnapshot
 Type: Microsoft.VisualStudio.Text.ITextSnapshot
 The snapshot to which to translate.
- spanTrackingMode
 Type: Microsoft.VisualStudio.Text.SpanTrackingMode
 The SpanTrackingMode to use in the translation.
Return Value
Type: Microsoft.VisualStudio.Text.SnapshotSpan
A new snapshot span.
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 span. | 
.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.