ITextCaret::MoveTo Method (VirtualSnapshotPoint, PositionAffinity)
Visual Studio 2015
Moves the caret to the specified buffer position.
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
CaretPosition MoveTo( VirtualSnapshotPoint bufferPosition, PositionAffinity caretAffinity )
Parameters
- bufferPosition
-
Type:
Microsoft.VisualStudio.Text::VirtualSnapshotPoint
The VirtualSnapshotPoint in the underlying text buffer to which to move the caret.
- caretAffinity
-
Type:
Microsoft.VisualStudio.Text::PositionAffinity
The affinity of the caret. This is ignored unless bufferPosition specifies a location that is at the seam between two word-wrapped lines.
Return Value
Type: Microsoft.VisualStudio.Text.Editor::CaretPositionA CaretPosition that contains the valid values of the caret position after the move has occurred.
This is equivalent to calling MoveTo(bufferPosition, caretAffinity, true).
Show: