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)
Syntax
'宣言
Sub MoveCaret ( _
textLine As ITextViewLine, _
horizontalOffset As Double, _
extendSelection As Boolean _
)
void MoveCaret(
ITextViewLine textLine,
double horizontalOffset,
bool extendSelection
)
void MoveCaret(
ITextViewLine^ textLine,
double horizontalOffset,
bool extendSelection
)
abstract MoveCaret :
textLine:ITextViewLine *
horizontalOffset:float *
extendSelection:bool -> unit
function MoveCaret(
textLine : ITextViewLine,
horizontalOffset : double,
extendSelection : boolean
)
Parameters
- textLine
Type: Microsoft.VisualStudio.Text.Formatting.ITextViewLine
The ITextViewLine on which to place the caret.
- horizontalOffset
Type: System.Double
The horizontal location in the given textLine to which to move the caret.
- extendSelection
Type: System.Boolean
If true, the selection is extended when the caret is moved; if false, the selection is not extended.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | textLine is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.