Selection
Represents the selection.
Definition
Namespace:Telerik.WinForms.Controls.Spreadsheet.Worksheets
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public class Selection : SelectionBase, IWeakEventListener
Inheritance: objectSelectionBaseSelection
Implements:
Inherited Members
Properties
Gets the active cell selection.
public CellSelection ActiveCell { get; }
The active cell selection.
Gets the index of the active cell.
public CellIndex ActiveCellIndex { get; }
The index of the active cell.
Gets or sets the active cell mode.
public ActiveCellMode ActiveCellMode { get; set; }
The active cell mode.
Gets the region that contains the active cell.
public CellRange CurrentRegion { get; }
Gets or sets the value indicating whether the active selection is cell selection or shape selection.
public bool IsCellSelection { get; }
The value returned is true if the active selection is cell selection and false if it is shape selection.
Gets the selected shapes.
public ShapeSelection Shapes { get; }
The selected shapes.
Methods
Creates the selection state.
Ensures the display mode.
public void EnsureDisplayMode()
Called when the active cell mode is changed.
protected virtual void OnActiveCellModeChanged()
Called when the selection is changed.
protected override void OnSelectionChanged()
Overrides:
Receives events from the centralized event manager.
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
The type of the WeakEventManager calling this method.
senderobjectObject that originated the event.
eEventArgsEvent data.
Returns:true if the listener handled the event. It is considered an error by the WeakEventManager handling in WPF to register a listener for an event that the listener does not handle. Regardless, the method should return false if it receives an event that it does not recognize or handle.
Implements:
Restores the selection state.
public void RestoreSelectionState(SelectionState selectionState)
State of the selection.
Selects the specified shape.
public void Select(FloatingShapeBase shape, bool clearSelection = true)
The shape.
clearSelectionboolDefines if the old selection has to be cleared.
Selects the specified shapes.
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)
The shapes.
clearSelectionboolDefines if the old selection has to be cleared.
Selects the active cell.
public void SelectActiveCell()
Events
Occurs when the active cell mode is changed.
public event EventHandler ActiveCellModeChanged
Occurs when the selection type is changed between cell selection and shape selection.
public event EventHandler SelectionTypeChanged