Class Selection
Represents the selection.
Inherited Members
Namespace: Telerik.WinForms.Controls.Spreadsheet.Worksheets
Assembly: Telerik.WinControls.RadSpreadsheet.dll
Syntax
public class Selection : SelectionBase, IWeakEventListener
Properties
ActiveCell
Gets the active cell selection.
Declaration
public CellSelection ActiveCell { get; }
Property Value
|
CellSelection
The active cell selection. |
ActiveCellIndex
Gets the index of the active cell.
Declaration
public CellIndex ActiveCellIndex { get; }
Property Value
|
CellIndex
The index of the active cell. |
ActiveCellMode
Gets or sets the active cell mode.
Declaration
public ActiveCellMode ActiveCellMode { get; set; }
Property Value
|
ActiveCellMode
The active cell mode. |
CurrentRegion
Gets the region that contains the active cell.
Declaration
public CellRange CurrentRegion { get; }
Property Value
|
CellRange
|
IsCellSelection
Gets or sets the value indicating whether the active selection is cell selection or shape selection.
Declaration
public bool IsCellSelection { get; }
Property Value
|
System.Boolean
The value returned is true if the active selection is cell selection and false if it is shape selection. |
Shapes
Gets the selected shapes.
Declaration
public ShapeSelection Shapes { get; }
Property Value
|
ShapeSelection
The selected shapes. |
Methods
CreateSelectionState()
Creates the selection state.
Declaration
public SelectionState CreateSelectionState()
Returns
|
SelectionState
The selection state. |
EnsureDisplayMode()
Ensures the display mode.
Declaration
public void EnsureDisplayMode()
IntersectsColumn(Int32)
Checks if the the column intersects with the selection.
Declaration
public override sealed bool IntersectsColumn(int columnIndex)
Parameters
|
System.Int32
columnIndex
Index of the column. |
Returns
|
System.Boolean
|
Overrides
IntersectsRow(Int32)
Checks if the the row intersects with the selection.
Declaration
public override sealed bool IntersectsRow(int rowIndex)
Parameters
|
System.Int32
rowIndex
Index of the row. |
Returns
|
System.Boolean
|
Overrides
OnActiveCellModeChanged()
Called when the active cell mode is changed.
Declaration
protected virtual void OnActiveCellModeChanged()
OnSelectionChanged()
Called when the selection is changed.
Declaration
protected override void OnSelectionChanged()
Overrides
ReceiveWeakEvent(Type, Object, EventArgs)
Receives events from the centralized event manager.
Declaration
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Parameters
|
System.Type
managerType
The type of the System.Windows.WeakEventManager calling this method. |
|
System.Object
sender
Object that originated the event. |
|
System.EventArgs
e
Event data. |
Returns
|
System.Boolean
true if the listener handled the event. It is considered an error by the System.Windows.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. |
RestoreSelectionState(SelectionState)
Restores the selection state.
Declaration
public void RestoreSelectionState(SelectionState selectionState)
Parameters
|
SelectionState
selectionState
State of the selection. |
Select(IEnumerable<FloatingShapeBase>, Boolean)
Selects the specified shapes.
Declaration
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)
Parameters
|
System.Collections.Generic.IEnumerable<FloatingShapeBase>
shapes
The shapes. |
|
System.Boolean
clearSelection
Defines if the old selection has to be cleared. |
Select(FloatingShapeBase, Boolean)
Selects the specified shape.
Declaration
public void Select(FloatingShapeBase shape, bool clearSelection = true)
Parameters
|
FloatingShapeBase
shape
The shape. |
|
System.Boolean
clearSelection
Defines if the old selection has to be cleared. |
SelectActiveCell()
Selects the active cell.
Declaration
public void SelectActiveCell()
Events
ActiveCellModeChanged
Occurs when the active cell mode is changed.
Declaration
public event EventHandler ActiveCellModeChanged
Event Type
|
System.EventHandler
|
SelectionTypeChanged
Occurs when the selection type is changed between cell selection and shape selection.
Declaration
public event EventHandler SelectionTypeChanged
Event Type
|
System.EventHandler
|