0 out of 1 rated this helpful - Rate this topic

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

The ITextSelection type exposes the following members.

  NameDescription
Public propertyActivationTracksFocusDetermines whether IsActive should track when the ITextView gains and loses aggregate focus. The default is true.
Public propertyActivePointGets the active point of the selection.
Public propertyAnchorPointGets the anchor point of the selection.
Public propertyEndGets the end point of the selection.
Public propertyIsActiveWhether or not the selection is active.
Public propertyIsEmptyDetermines whether the selection is zero length.
Public propertyIsReversedDetermines whether the active point is Span.Start and the anchor point is Span.End.
Public propertyModeGets or sets the selection mode.
Public propertySelectedSpansThe currently-selected spans.
Public propertyStartGets the start point of the selection.
Public propertyStreamSelectionSpanGets the current selection as if it were a stream selection, regardless of the current selection mode.
Public propertyTextViewGets the text view to which this selection belongs.
Public propertyVirtualSelectedSpansThe currently-selected spans, as VirtualSnapshotSpan objects.
Top
  NameDescription
Public methodClearMakes the selection zero length, with a start and end position at the logical end of the current selection.
Public methodGetSelectionOnTextViewLineGet the selection on the specified ITextViewLine.
Public methodSelect(SnapshotSpan, Boolean)Selects the text in the specified selection span.
Public methodSelect(VirtualSnapshotPoint, VirtualSnapshotPoint)Selects the text between the two VirtualSnapshotPoint objects.
Top
  NameDescription
Public eventSelectionChangedOccurs 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.
Top
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.