Share via


ITextSelection.VirtualSelectedSpans Property

Definition

The currently-selected spans, as VirtualSnapshotSpan objects.

public:
 property System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Text::VirtualSnapshotSpan> ^ VirtualSelectedSpans { System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::VisualStudio::Text::VirtualSnapshotSpan> ^ get(); };
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.VirtualSnapshotSpan> VirtualSelectedSpans { get; }
member this.VirtualSelectedSpans : System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.VisualStudio.Text.VirtualSnapshotSpan>
Public ReadOnly Property VirtualSelectedSpans As ReadOnlyCollection(Of VirtualSnapshotSpan)

Property Value

A collection of currently-selected spans.

Remarks

This span collection will never be empty. However, the spans in this collection may be 0-length.

This value can be very expensive to compute the first time after the selection has changed.

Use GetSelectionOnTextViewLine() unless you need the entire selection.

Applies to