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>
)
參數
anchorPoint
類型:Microsoft.VisualStudio.Text.VirtualSnapshotPoint新的選取範圍錨點。
activePoint
類型:Microsoft.VisualStudio.Text.VirtualSnapshotPoint插入號位置與新的選取範圍的作用點。
selectionMode
類型:Microsoft.VisualStudio.Text.Editor.TextSelectionMode新的選取項目選取模式。
scrollOptions
類型:Nullable<EnsureSpanVisibleOptions>向下捲動到選取範圍後,在檢視中完成。 如果nullnull 參考 (即 Visual Basic 中的 Nothing),無捲動。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。