ITextSelection Interface

Definition

Represents the selected text in an ITextView

public interface class ITextSelection
public interface class ITextSelection
__interface ITextSelection
public interface ITextSelection
type ITextSelection = interface
Public Interface ITextSelection

Properties

ActivationTracksFocus

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

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 empty.

IsReversed

Is true if the ActivePoint comes before the AnchorPoint.

Mode

Gets or sets the selection mode.

SelectedSpans

The currently-selected spans.

Start

Gets the start point of the selection.

StreamSelectionSpan

Get 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.

Methods

Clear()

Clears the selection.

GetSelectionOnTextViewLine(ITextViewLine)

Get the selection on a particular ITextViewLine.

Select(SnapshotSpan, Boolean)

Selects the text in the specified selectionSpan.

Select(VirtualSnapshotPoint, VirtualSnapshotPoint)

Select from the anchor point to the active point.

Events

SelectionChanged

Occurs when Select or Clear start to be called. The sender of the event will be this ITextSelection.

Applies to