Expand Minimize

IEditorOperations.MoveCaret Method

Moves the caret to the given line at the given offset.

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

void MoveCaret(
	ITextViewLine textLine,
	double horizontalOffset,
	bool extendSelection
)

Parameters

textLine
Type: Microsoft.VisualStudio.Text.Formatting.ITextViewLine

The ITextViewLine on which to place the caret.

horizontalOffset
Type: Double

The horizontal location in the given textLine to which to move the caret.

extendSelection
Type: Boolean

If true, the selection is extended when the caret is moved; if false, the selection is not extended.

ExceptionCondition
ArgumentNullException

textLine is null.

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