ITextSelection.SelectedSpans Property
The currently-selected spans.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Déclaration
ReadOnly Property SelectedSpans As NormalizedSnapshotSpanCollection
NormalizedSnapshotSpanCollection SelectedSpans { get; }
property NormalizedSnapshotSpanCollection^ SelectedSpans {
NormalizedSnapshotSpanCollection^ get ();
}
abstract SelectedSpans : NormalizedSnapshotSpanCollection
function get SelectedSpans () : NormalizedSnapshotSpanCollection
Property Value
Type: Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection
The currently-selected spans.
Remarks
This span collection is never empty, but the spans in this collection may be 0-length. This value can be very expensive to compute for the first time after the selection has changed, or after the view has done a layout. Use GetSelectionOnTextViewLine unless you need the entire selection.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.