IEditorOperations.SelectAndMoveCaret Method (VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode)

Selects from the specified anchor point to the active point, moving the caret to the new active point of the selection, and ensuring that the selection is in the specified selection mode, and making the selected span visible.

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

void SelectAndMoveCaret(
	VirtualSnapshotPoint anchorPoint,
	VirtualSnapshotPoint activePoint,
	TextSelectionMode selectionMode


Type: Microsoft.VisualStudio.Text.VirtualSnapshotPoint

The anchor point of the new selection.

Type: Microsoft.VisualStudio.Text.VirtualSnapshotPoint

The active point of the new selection and position of the caret.

Type: Microsoft.VisualStudio.Text.Editor.TextSelectionMode

The selection mode of the new selection.

This does the minimum amount of scrolling required to ensure that the selected span is visible.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft