ClassSelectionState
Captures the current selection state in a worksheet, including selected cell ranges, active cell, viewport pane, and selected shapes.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.Model
Assembly:Telerik.Windows.Documents.Spreadsheet.dll
Syntax:
public class SelectionState
Inheritance: objectSelectionState
Constructors
SelectionState(IEnumerable<CellRange>, CellIndex, ViewportPaneType)
Initializes a new SelectionState with the specified selected ranges, active cell, and viewport pane.
Declaration
public SelectionState(IEnumerable<CellRange> selectedRanges, CellIndex activeCellIndex, ViewportPaneType pane)
Parameters
selectedRanges
IEnumerable<CellRange>
The selected ranges.
activeCellIndex
Index of the active cell.
pane
The pane.
Properties
ActiveCellIndex
Gets the index of the active cell, which receives keyboard input and is the focus point for selection operations.
Declaration
public CellIndex ActiveCellIndex { get; }
Property Value
The index of the active cell.
Pane
Gets the viewport pane where the selection is located, relevant when the worksheet has frozen panes.
Declaration
public ViewportPaneType Pane { get; }
Property Value
The pane.
SelectedRanges
Gets the collection of cell ranges currently selected in the worksheet.
Declaration
public IEnumerable<CellRange> SelectedRanges { get; }
Property Value
IEnumerable<CellRange>
The selected ranges.
Methods
Clone()
Creates a deep copy of this selection state.
Declaration
public SelectionState Clone()
Returns
The cloned selection state.
ToString()
Returns a string representation of this selection state, including pane, active cell, and selected ranges.