ClassSelection
Represents the selection.
Definition
Namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets
Assembly:Telerik.Windows.Controls.Spreadsheet.dll
Syntax:
public class Selection : SelectionBase, IWeakEventListener
Inheritance: objectSelectionBaseSelection
Implements:
Inherited Members
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
The active cell mode.
CurrentRegion
Gets the region that contains the active cell.
Declaration
public CellRange CurrentRegion { get; }
Property Value
CellRange
FillSelection
Gets the fill selection.
Declaration
public FillSelection FillSelection { get; }
Property Value
The fill selection.
IsCellSelection
Gets or sets the value indicating whether the active selection is cell selection or shape selection.
Declaration
public bool IsCellSelection { get; }
Property Value
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
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(int)
Checks if the column intersects with the selection.
IntersectsRow(int)
Checks if the row intersects with the selection.
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
managerType
The type of the calling this method.
sender
Object that originated the event.
e
Event data.
Returns
true if the listener handled the event. It is considered an error by the 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(FloatingShapeBase, bool)
Selects the specified shape.
Declaration
public void Select(FloatingShapeBase shape, bool clearSelection = true)
Parameters
shape
FloatingShapeBase
The shape.
clearSelection
Defines if the old selection has to be cleared.
Select(IEnumerable<FloatingShapeBase>, bool)
Selects the specified shapes.
Declaration
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)
Parameters
shapes
IEnumerable<FloatingShapeBase>
The shapes.
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 Value
SelectionTypeChanged
Occurs when the selection type is changed between cell selection and shape selection.
Declaration
public event EventHandler SelectionTypeChanged
Event Value