ITextSelection Interface
Represents the selected text in an ITextView.
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
| Name | Description | |
|---|---|---|
![]() | ActivationTracksFocus | |
![]() | ActivePoint | Gets the active point of the selection. |
![]() | AnchorPoint | Gets the anchor point of the selection. |
![]() | End | Gets the end point of the selection. |
![]() | IsActive | Whether or not the selection is active. |
![]() | IsEmpty | Determines whether the selection is zero length. |
![]() | IsReversed | Determines whether the active point is Span.Start and the anchor point is Span.End. |
![]() | Mode | Gets or sets the selection mode. |
![]() | SelectedSpans | The currently-selected spans. |
![]() | Start | Gets the start point of the selection. |
![]() | StreamSelectionSpan | Gets the current selection as if it were a stream selection, regardless of the current selection mode. |
![]() | TextView | Gets the text view to which this selection belongs. |
![]() | VirtualSelectedSpans | The currently-selected spans, as VirtualSnapshotSpan objects. |
| Name | Description | |
|---|---|---|
![]() | Clear() | Makes the selection zero length, with a start and end position at the logical end of the current selection. |
![]() | GetSelectionOnTextViewLine(ITextViewLine) | Get the selection on the specified ITextViewLine. |
![]() | Select(SnapshotSpan, Boolean) | Selects the text in the specified selection span. |
![]() | Select(VirtualSnapshotPoint, VirtualSnapshotPoint) | Selects the text between the two VirtualSnapshotPoint objects. |
| Name | Description | |
|---|---|---|
![]() | SelectionChanged | Occurs when Select or Clear are called, as well as when the selection is empty and the caret is moved. The sender of the event is this ITextSelection. |


