共用方式為


IEditorOperations.SelectAndMoveCaret 方法 (VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>)

選取從指定的錨點至作用點,將插入號移至新選取範圍的作用點確保選取範圍位於指定的選取模式而定,讓選取的範圍成為可見。

命名空間:  Microsoft.VisualStudio.Text.Operations
組件:  Microsoft.VisualStudio.Text.UI (在 Microsoft.VisualStudio.Text.UI.dll 中)

語法

'宣告
Sub SelectAndMoveCaret ( _
    anchorPoint As VirtualSnapshotPoint, _
    activePoint As VirtualSnapshotPoint, _
    selectionMode As TextSelectionMode, _
    scrollOptions As Nullable(Of EnsureSpanVisibleOptions) _
)
void SelectAndMoveCaret(
    VirtualSnapshotPoint anchorPoint,
    VirtualSnapshotPoint activePoint,
    TextSelectionMode selectionMode,
    Nullable<EnsureSpanVisibleOptions> scrollOptions
)
void SelectAndMoveCaret(
    VirtualSnapshotPoint anchorPoint, 
    VirtualSnapshotPoint activePoint, 
    TextSelectionMode selectionMode, 
    Nullable<EnsureSpanVisibleOptions> scrollOptions
)
abstract SelectAndMoveCaret : 
        anchorPoint:VirtualSnapshotPoint * 
        activePoint:VirtualSnapshotPoint * 
        selectionMode:TextSelectionMode * 
        scrollOptions:Nullable<EnsureSpanVisibleOptions> -> unit
function SelectAndMoveCaret(
    anchorPoint : VirtualSnapshotPoint, 
    activePoint : VirtualSnapshotPoint, 
    selectionMode : TextSelectionMode, 
    scrollOptions : Nullable<EnsureSpanVisibleOptions>
)

參數

  • scrollOptions
    類型:Nullable<EnsureSpanVisibleOptions>

    向下捲動到選取範圍後,在檢視中完成。 如果nullnull 參考 (即 Visual Basic 中的 Nothing),無捲動。

.NET Framework 安全性

請參閱

參考

IEditorOperations 介面

SelectAndMoveCaret 多載

Microsoft.VisualStudio.Text.Operations 命名空間