Class
Selection

Represents the selection.

Definition

Namespace:Telerik.Windows.Controls.Spreadsheet.Worksheets

Assembly:Telerik.Windows.Controls.Spreadsheet.dll

Syntax:

cs-api-definition
public class Selection : SelectionBase, IWeakEventListener

Inheritance: objectSelectionBaseSelection

Implements: IWeakEventListener

Inherited Members SelectionBase.BeginUpdate()SelectionBase.EndUpdate()SelectionBase.Select(int, int, int, int, bool)SelectionBase.Select(CellIndex, bool)SelectionBase.Select(CellRange, bool)SelectionBase.Select(CellIndex, CellIndex, bool)SelectionBase.SelectAll()SelectionBase.ContainsIndex(CellIndex)SelectionBase.ContainsPosition(CellPosition)SelectionBase.ContainsRange(CellRange)SelectionBase.ContainsRow(int)SelectionBase.ContainsColumn(int)SelectionBase.OnSelectionUpdate()SelectionBase.OnSelectionChanging(SelectionChangingEventArgs)SelectionBase.OnSelectionChangingCanceled()SelectionBase.SelectedRangesSelectionBase.SelectedRangesCountSelectionBase.IsSelectionInProgressSelectionBase.ActiveRangeSelectionBase.IsRowSelectionSelectionBase.IsColumnSelectionSelectionBase.CellsSelectionBase.RowsSelectionBase.ColumnsSelectionBase.SelectionUpdateSelectionBase.SelectionChangingSelectionBase.SelectionChangedSelectionBase.SelectionChangingCanceled

Properties

ActiveCell

Gets the active cell selection.

Declaration

cs-api-definition
public CellSelection ActiveCell { get; }

Property Value

CellSelection

The active cell selection.

ActiveCellIndex

Gets the index of the active cell.

Declaration

cs-api-definition
public CellIndex ActiveCellIndex { get; }

Property Value

CellIndex

The index of the active cell.

ActiveCellMode

Gets or sets the active cell mode.

Declaration

cs-api-definition
public ActiveCellMode ActiveCellMode { get; set; }

Property Value

ActiveCellMode

The active cell mode.

CurrentRegion

Gets the region that contains the active cell.

Declaration

cs-api-definition
public CellRange CurrentRegion { get; }

Property Value

CellRange

FillSelection

Gets the fill selection.

Declaration

cs-api-definition
public FillSelection FillSelection { get; }

Property Value

FillSelection

The fill selection.

IsCellSelection

Gets or sets the value indicating whether the active selection is cell selection or shape selection.

Declaration

cs-api-definition
public bool IsCellSelection { get; }

Property Value

bool

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

cs-api-definition
public ShapeSelection Shapes { get; }

Property Value

ShapeSelection

The selected shapes.

Methods

CreateSelectionState()

Creates the selection state.

Declaration

cs-api-definition
public SelectionState CreateSelectionState()

Returns

SelectionState

The selection state.

EnsureDisplayMode()

Ensures the display mode.

Declaration

cs-api-definition
public void EnsureDisplayMode()

IntersectsColumn(int)

Checks if the column intersects with the selection.

Declaration

cs-api-definition
public override sealed bool IntersectsColumn(int columnIndex)

Parameters

columnIndex

int

Index of the column.

Returns

bool

True if intersects.

Overrides SelectionBase.IntersectsColumn(int)

IntersectsRow(int)

Checks if the row intersects with the selection.

Declaration

cs-api-definition
public override sealed bool IntersectsRow(int rowIndex)

Parameters

rowIndex

int

Index of the row.

Returns

bool

True if intersects.

Overrides SelectionBase.IntersectsRow(int)

OnActiveCellModeChanged()

Called when the active cell mode is changed.

Declaration

cs-api-definition
protected virtual void OnActiveCellModeChanged()

OnSelectionChanged()

Called when the selection is changed.

Declaration

cs-api-definition
protected override void OnSelectionChanged()

Overrides SelectionBase.OnSelectionChanged()

ReceiveWeakEvent(Type, object, EventArgs)

Receives events from the centralized event manager.

Declaration

cs-api-definition
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)

Parameters

managerType

Type

The type of the calling this method.

sender

object

Object that originated the event.

e

EventArgs

Event data.

Returns

bool

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

cs-api-definition
public void RestoreSelectionState(SelectionState selectionState)

Parameters

selectionState

SelectionState

State of the selection.

Select(FloatingShapeBase, bool)

Selects the specified shape.

Declaration

cs-api-definition
public void Select(FloatingShapeBase shape, bool clearSelection = true)

Parameters

shape

FloatingShapeBase

The shape.

clearSelection

bool

Defines if the old selection has to be cleared.

Select(IEnumerable<FloatingShapeBase>, bool)

Selects the specified shapes.

Declaration

cs-api-definition
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)

Parameters

shapes

IEnumerable<FloatingShapeBase>

The shapes.

clearSelection

bool

Defines if the old selection has to be cleared.

SelectActiveCell()

Selects the active cell.

Declaration

cs-api-definition
public void SelectActiveCell()

Events

ActiveCellModeChanged

Occurs when the active cell mode is changed.

Declaration

cs-api-definition
public event EventHandler ActiveCellModeChanged

Event Value

EventHandler

SelectionTypeChanged

Occurs when the selection type is changed between cell selection and shape selection.

Declaration

cs-api-definition
public event EventHandler SelectionTypeChanged

Event Value

EventHandler