Share via


ITextCaret.MoveTo Method (SnapshotPoint, PositionAffinity)

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

'Declaration
Function MoveTo ( _
    bufferPosition As SnapshotPoint, _
    caretAffinity As PositionAffinity _
) As CaretPosition
CaretPosition MoveTo(
    SnapshotPoint bufferPosition,
    PositionAffinity caretAffinity
)
CaretPosition MoveTo(
    SnapshotPoint bufferPosition, 
    PositionAffinity caretAffinity
)
abstract MoveTo : 
        bufferPosition:SnapshotPoint * 
        caretAffinity:PositionAffinity -> CaretPosition
function MoveTo(
    bufferPosition : SnapshotPoint, 
    caretAffinity : PositionAffinity
) : CaretPosition

Parameters

Return Value

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

Remarks

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

.NET Framework Security

See Also

Reference

ITextCaret Interface

MoveTo Overload

Microsoft.VisualStudio.Text.Editor Namespace