Freigeben über


IEditorOperations.SelectAndMoveCaret Method

Definition

Overloads

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. The selected span will be made visible.

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible.

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible.

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. The selected span will be made visible.

public:
 void SelectAndMoveCaret(Microsoft::VisualStudio::Text::VirtualSnapshotPoint anchorPoint, Microsoft::VisualStudio::Text::VirtualSnapshotPoint activePoint);
public void SelectAndMoveCaret (Microsoft.VisualStudio.Text.VirtualSnapshotPoint anchorPoint, Microsoft.VisualStudio.Text.VirtualSnapshotPoint activePoint);
abstract member SelectAndMoveCaret : Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.VirtualSnapshotPoint -> unit
Public Sub SelectAndMoveCaret (anchorPoint As VirtualSnapshotPoint, activePoint As VirtualSnapshotPoint)

Parameters

anchorPoint
VirtualSnapshotPoint

The anchor point of the new selection.

activePoint
VirtualSnapshotPoint

The active point of the new selection and position of the caret.

Remarks

This puts the selection in stream selection mode and does the minimum amount of required scrolling to ensure the selected span is visible.

Applies to

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible.

public:
 void SelectAndMoveCaret(Microsoft::VisualStudio::Text::VirtualSnapshotPoint anchorPoint, Microsoft::VisualStudio::Text::VirtualSnapshotPoint activePoint, Microsoft::VisualStudio::Text::Editor::TextSelectionMode selectionMode);
public void SelectAndMoveCaret (Microsoft.VisualStudio.Text.VirtualSnapshotPoint anchorPoint, Microsoft.VisualStudio.Text.VirtualSnapshotPoint activePoint, Microsoft.VisualStudio.Text.Editor.TextSelectionMode selectionMode);
abstract member SelectAndMoveCaret : Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.Editor.TextSelectionMode -> unit
Public Sub SelectAndMoveCaret (anchorPoint As VirtualSnapshotPoint, activePoint As VirtualSnapshotPoint, selectionMode As TextSelectionMode)

Parameters

anchorPoint
VirtualSnapshotPoint

The anchor point of the new selection.

activePoint
VirtualSnapshotPoint

The active point of the new selection and position of the caret.

selectionMode
TextSelectionMode

The selection mode of the new selection.

Remarks

This does the minimum amount of required scrolling to ensure the selected span is visible.

Applies to

SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>)

Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible.

public:
 void SelectAndMoveCaret(Microsoft::VisualStudio::Text::VirtualSnapshotPoint anchorPoint, Microsoft::VisualStudio::Text::VirtualSnapshotPoint activePoint, Microsoft::VisualStudio::Text::Editor::TextSelectionMode selectionMode, Nullable<Microsoft::VisualStudio::Text::Editor::EnsureSpanVisibleOptions> scrollOptions);
public void SelectAndMoveCaret (Microsoft.VisualStudio.Text.VirtualSnapshotPoint anchorPoint, Microsoft.VisualStudio.Text.VirtualSnapshotPoint activePoint, Microsoft.VisualStudio.Text.Editor.TextSelectionMode selectionMode, Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions? scrollOptions);
abstract member SelectAndMoveCaret : Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.VirtualSnapshotPoint * Microsoft.VisualStudio.Text.Editor.TextSelectionMode * Nullable<Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions> -> unit
Public Sub SelectAndMoveCaret (anchorPoint As VirtualSnapshotPoint, activePoint As VirtualSnapshotPoint, selectionMode As TextSelectionMode, scrollOptions As Nullable(Of EnsureSpanVisibleOptions))

Parameters

anchorPoint
VirtualSnapshotPoint

The anchor point of the new selection.

activePoint
VirtualSnapshotPoint

The active point of the new selection and position of the caret.

selectionMode
TextSelectionMode

The selection mode of the new selection.

scrollOptions
Nullable<EnsureSpanVisibleOptions>

What, if any, scrolling is done in the view after the selection is made. If null, no scrolling is done.

Applies to