Share via


ITextCaret.MoveTo Method (SnapshotPoint)

Moves the caret to the given index in the underlying ITextBuffer.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Déclaration
Function MoveTo ( _
    bufferPosition As SnapshotPoint _
) As CaretPosition
CaretPosition MoveTo(
    SnapshotPoint bufferPosition
)
CaretPosition MoveTo(
    SnapshotPoint bufferPosition
)
abstract MoveTo : 
        bufferPosition:SnapshotPoint -> CaretPosition 
function MoveTo(
    bufferPosition : SnapshotPoint
) : CaretPosition

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Editor.CaretPosition
A CaretPosition that contains the valid values of the caret after the move has occurred.

Remarks

This is equivalent to calling MoveTo(bufferPosition, PositionAffinity.Successor, true).

.NET Framework Security

See Also

Reference

ITextCaret Interface

MoveTo Overload

Microsoft.VisualStudio.Text.Editor Namespace