IEditorViewSelectionState Interface
Provides the base requirements for an object that can persist the selection state for an IEditorView and restore it later under a new snapshot.
public interface IEditorViewSelectionState
Remarks
Instances can be created via calls to CaptureState().
Properties
Ranges
Gets the collection of selection ranges.
ITextPositionRangeCollection Ranges { get; }
Property Value
- ITextPositionRangeCollection:
The collection of selection ranges.
Remarks
This collection ordinarily contains a single range, but can have more than one range when there are multiple selections. Each selection range has its own caret at the selection range's end position.
Methods
Restore()
Restores the selection.
void Restore()
Restore(bool)
Restores the selection.
void Restore(bool collapseColumns)
Parameter | Type | Description |
---|---|---|
collapseColumns | bool | Whether to collapse a block selection to zero columns, and ensure the selection end is not in virtual space. |