Class SelectionController
Represents a class which implements the selection behavior of CellGrid.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.CellGrid
Assembly: Syncfusion.SfCellGrid.WPF.dll
Syntax
public class SelectionController : ISelectionController, IDisposable
Constructors
SelectionController(SfCellGrid)
Initializes a new instance of the SelectionController class.
Declaration
public SelectionController(SfCellGrid grid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfCellGrid | grid | An instance of SfCellGrid. |
Properties
Column
Gets the value indicating the instance of GridColumn under the current pointer location.
Declaration
protected GridColumn Column { get; set; }
Property Value
| Type | Description |
|---|---|
| GridColumn | An instance of GridColumn. |
Container
Gets the value indicating the instance of VisualContainer.
Declaration
protected VisualContainer Container { get; }
Property Value
| Type | Description |
|---|---|
| VisualContainer | An instance of VisualContainer. |
CurrentCell
Gets the value indicating the instance of GridCurrentCell of the SfCellGrid.
Declaration
public GridCurrentCell CurrentCell { get; }
Property Value
| Type | Description |
|---|---|
| GridCurrentCell | An instance of GridCurrentCell |
Grid
Gets the value indicating the instance of SfCellGrid.
Declaration
protected SfCellGrid Grid { get; }
Property Value
| Type | Description |
|---|---|
| SfCellGrid | An instance of SfCellGrid. |
SelectedRanges
Gets the list of selected ranges in Grid.
Declaration
public GridRangeInfoList SelectedRanges { get; }
Property Value
| Type | Description |
|---|---|
| GridRangeInfoList | A collection of selected ranges. |
SelectionFrame
Gets the value indicating the instance of SelectionPanel.
Declaration
protected SelectionPanel SelectionFrame { get; }
Property Value
| Type | Description |
|---|---|
| SelectionPanel | An instance of SelectionPanel. |
SelectionTrigger
Gets the value indicating how the current selection is triggered.
Declaration
protected ActivationTrigger SelectionTrigger { get; set; }
Property Value
| Type | Description |
|---|---|
| ActivationTrigger | One of the enum options of Activation. |
ShowTouchIndicator
Determines whether touch indicator will be shown or not.
Declaration
public bool ShowTouchIndicator { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True or False. |
TouchHitTestPrecision
Gets or sets the distance of touch precision point from touch indicator.
Declaration
public double TouchHitTestPrecision { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | Distance of touch precision. |
Methods
AddSelection(GridRangeInfo)
Adds the selection on mentioned range.
Declaration
public void AddSelection(GridRangeInfo range)
Parameters
| Type | Name | Description |
|---|---|---|
| GridRangeInfo | range | Range where to extend the selection. |
AutoScrollerValueChanged(Object, AutoScrollerValueChangedEventArgs)
Occurs when the AutoScroller value changed.
Declaration
protected virtual void AutoScrollerValueChanged(object sender, AutoScrollerValueChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | Soruce of the event. |
| AutoScrollerValueChangedEventArgs | args | An instance of AutoScrollerValueChangedEventArgs. |
ClearSelection()
Clears the selection.
Declaration
public void ClearSelection()
Dispose()
Call the Dispose and SuppressFinalize method for dipose the instance of SelectionController class.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the SelectionController and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | Dispose the instance, if it is True |
HandleKeyDown(KeyEventArgs)
Handles the KeyDown operations in SfCellGrid.
Declaration
public void HandleKeyDown(KeyEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | args | An instance of System.Windows.Input.KeyEventArgs that contains data. |
HandlePointerOperations(GridPointerEventArgs, RowColumnIndex)
Handles the Pointer/Mouse Operations in SfCellGrid.
Declaration
public void HandlePointerOperations(GridPointerEventArgs args, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| GridPointerEventArgs | args | An instance of GridPointerEventArgs. |
| RowColumnIndex | rowcolIndex | Coordinates of a cell. |
OnDoubleTapped(MouseButtonEventArgs, RowColumnIndex)
Occurs when the pointer double tapped in the cell.
Declaration
protected virtual void OnDoubleTapped(MouseButtonEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | An instance of System.Windows.Input.MouseButtonEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerMoved(MouseEventArgs, RowColumnIndex)
Occurs when the pointer moves.
Declaration
protected virtual void OnPointerMoved(MouseEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | An instance of System.Windows.Input.MouseEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerPressed(MouseButtonEventArgs, RowColumnIndex)
Occurs when the pointer is pressed in SfCellGrid.
Declaration
protected virtual void OnPointerPressed(MouseButtonEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | An instance of System.Windows.Input.MouseButtonEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerReleased(MouseButtonEventArgs, RowColumnIndex)
Occurs when the pointer released.
Declaration
protected virtual void OnPointerReleased(MouseButtonEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | An instance of System.Windows.Input.MouseButtonEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerWheel(MouseWheelEventArgs, RowColumnIndex)
Occurs when scroll the mouse wheel.
Declaration
protected virtual void OnPointerWheel(MouseWheelEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseWheelEventArgs | e | An instance of System.Windows.Input.MouseWheelEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnTapped(MouseButtonEventArgs, RowColumnIndex)
Occurs when the pointer tapped in the cell.
Declaration
protected virtual void OnTapped(MouseButtonEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | An instance of System.Windows.Input.MouseButtonEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessDragSelection(RowColumnIndex)
Used to process the pointer/touch selection on mouse move.
Declaration
protected virtual void ProcessDragSelection(RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessHeaderDragSelection(RowColumnIndex)
Used to process the pointer/touch selection on mouse move over header.
Declaration
protected virtual void ProcessHeaderDragSelection(RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessHeaderSelection(MouseEventArgs, RowColumnIndex)
Used to process the pointer/touch selection on Header(whole row/column).
Declaration
protected virtual void ProcessHeaderSelection(MouseEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | An instance of System.Windows.Input.MouseEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessKeyNavigation(KeyEventArgs)
Used to process the key navigation in SfCellGrid.
Declaration
protected virtual bool ProcessKeyNavigation(KeyEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | args | An instance of System.Windows.Input.KeyEventArgs that contains data. |
Returns
| Type |
|---|
| System.Boolean |
ProcessPointerSelection(MouseEventArgs, RowColumnIndex)
Used to process the pointer/touch normal selection.
Declaration
protected virtual void ProcessPointerSelection(MouseEventArgs e, RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseEventArgs | e | An instance of System.Windows.Input.MouseEventArgs that contains data. |
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessShiftKeyNavigation(KeyEventArgs)
Used to process the key navigation when shift key is pressed.
Declaration
protected virtual void ProcessShiftKeyNavigation(KeyEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.KeyEventArgs | args | An instance of System.Windows.Input.KeyEventArgs that contains data. |
ProcessShiftSelection(RowColumnIndex)
Used to process the pointer/touch selection when shift key is pressed.
Declaration
protected virtual void ProcessShiftSelection(RowColumnIndex rowcolIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ShowCurrentCell()
Determines whether to show current cell or not on selection.
Declaration
protected virtual bool ShowCurrentCell()
Returns
| Type | Description |
|---|---|
| System.Boolean | If true, draws the current cell |
UnWireEvents()
Unwire the Grid and AutoScroler events
Declaration
protected virtual void UnWireEvents()
WireEvents()
Wire the Grid and AutoScroller events
Declaration
protected virtual void WireEvents()