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)

CaretPosition MoveTo(
	SnapshotPoint bufferPosition
)

Parameters

bufferPosition
Type: Microsoft.VisualStudio.Text::SnapshotPoint

The SnapshotPoint in the underlying text buffer to which to move the caret.

Return Value

Type: Microsoft.VisualStudio.Text.Editor::CaretPosition

A CaretPosition that contains the valid values of the caret after the move has occurred.

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

Return to top
Show: