New to Telerik UI for WinFormsStart a free 30-day trial

Represents the selection.

Definition

Properties

Gets the active cell selection.

C#
public CellSelection ActiveCell { get; }
Property Value:

The active cell selection.

Gets the index of the active cell.

C#
public CellIndex ActiveCellIndex { get; }
Property Value:

The index of the active cell.

Gets or sets the active cell mode.

C#
public ActiveCellMode ActiveCellMode { get; set; }
Property Value:

The active cell mode.

Gets the region that contains the active cell.

C#
public CellRange CurrentRegion { get; }

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

C#
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.

Gets the selected shapes.

C#
public ShapeSelection Shapes { get; }
Property Value:

The selected shapes.

Methods

Creates the selection state.

C#
public SelectionState CreateSelectionState()
Returns:

SelectionState

The selection state.

Ensures the display mode.

C#
public void EnsureDisplayMode()

Checks if the the column intersects with the selection.

C#
public override sealed bool IntersectsColumn(int columnIndex)
Parameters:columnIndexint

Index of the column.

Returns:

bool

True if intersects.

Overrides: SelectionBase.IntersectsColumn(int)

Checks if the the row intersects with the selection.

C#
public override sealed bool IntersectsRow(int rowIndex)
Parameters:rowIndexint

Index of the row.

Returns:

bool

True if intersects.

Overrides: SelectionBase.IntersectsRow(int)

Called when the active cell mode is changed.

C#
protected virtual void OnActiveCellModeChanged()

Called when the selection is changed.

C#
protected override void OnSelectionChanged()

Overrides: SelectionBase.OnSelectionChanged()

Receives events from the centralized event manager.

C#
public bool ReceiveWeakEvent(Type managerType, object sender, EventArgs e)
Parameters:managerTypeType

The type of the WeakEventManager calling this method.

senderobject

Object that originated the event.

eEventArgs

Event data.

Returns:

bool

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: IWeakEventListener.ReceiveWeakEvent(Type, object, EventArgs)

Restores the selection state.

C#
public void RestoreSelectionState(SelectionState selectionState)
Parameters:selectionStateSelectionState

State of the selection.

Selects the specified shape.

C#
public void Select(FloatingShapeBase shape, bool clearSelection = true)
Parameters:shapeFloatingShapeBase

The shape.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects the specified shapes.

C#
public void Select(IEnumerable<FloatingShapeBase> shapes, bool clearSelection = true)
Parameters:shapesIEnumerable<FloatingShapeBase>

The shapes.

clearSelectionbool

Defines if the old selection has to be cleared.

Selects the active cell.

C#
public void SelectActiveCell()

Events

Occurs when the active cell mode is changed.

C#
public event EventHandler ActiveCellModeChanged

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

C#
public event EventHandler SelectionTypeChanged