ITextSelection Interface

 

Represents the selected text in an ITextView.

Namespace:   Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

public interface ITextSelection

NameDescription
System_CAPS_pubpropertyActivationTracksFocus

Determines whether IsActive should track when the ITextView gains and loses aggregate focus. The default is true.

System_CAPS_pubpropertyActivePoint

Gets the active point of the selection.

System_CAPS_pubpropertyAnchorPoint

Gets the anchor point of the selection.

System_CAPS_pubpropertyEnd

Gets the end point of the selection.

System_CAPS_pubpropertyIsActive

Whether or not the selection is active.

System_CAPS_pubpropertyIsEmpty

Determines whether the selection is zero length.

System_CAPS_pubpropertyIsReversed

Determines whether the active point is Span.Start and the anchor point is Span.End.

System_CAPS_pubpropertyMode

Gets or sets the selection mode.

System_CAPS_pubpropertySelectedSpans

The currently-selected spans.

System_CAPS_pubpropertyStart

Gets the start point of the selection.

System_CAPS_pubpropertyStreamSelectionSpan

Gets the current selection as if it were a stream selection, regardless of the current selection mode.

System_CAPS_pubpropertyTextView

Gets the text view to which this selection belongs.

System_CAPS_pubpropertyVirtualSelectedSpans

The currently-selected spans, as VirtualSnapshotSpan objects.

NameDescription
System_CAPS_pubmethodClear()

Makes the selection zero length, with a start and end position at the logical end of the current selection.

System_CAPS_pubmethodGetSelectionOnTextViewLine(ITextViewLine)

Get the selection on the specified ITextViewLine.

System_CAPS_pubmethodSelect(SnapshotSpan, Boolean)

Selects the text in the specified selection span.

System_CAPS_pubmethodSelect(VirtualSnapshotPoint, VirtualSnapshotPoint)

Selects the text between the two VirtualSnapshotPoint objects.

NameDescription
System_CAPS_pubeventSelectionChanged

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.

Return to top
Show: