使用英语阅读

通过


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

  • 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

See Also

Reference

IEditorOperations Interface

Microsoft.VisualStudio.Text.Operations Namespace