Class SelectionController
Represents a class which implements the selection behavior of CellGrid.
Inheritance
Namespace: Syncfusion.UI.Xaml.CellGrid
Assembly: Syncfusion.SfCellGrid.UWP.dll
Syntax
public class SelectionController : Object, 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(KeyRoutedEventArgs)
Handles the KeyDown operations in SfCellGrid.
Declaration
public void HandleKeyDown(KeyRoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | args | An instance of Windows.UI.Xaml.Input.KeyRoutedEventArgs 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(DoubleTappedRoutedEventArgs, RowColumnIndex)
Occurs when the pointer double tapped in the cell.
Declaration
protected virtual void OnDoubleTapped(DoubleTappedRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerMoved(PointerRoutedEventArgs, RowColumnIndex)
Occurs when the pointer moves.
Declaration
protected virtual void OnPointerMoved(PointerRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.PointerRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerPressed(PointerRoutedEventArgs, RowColumnIndex)
Occurs when the pointer is pressed in SfCellGrid.
Declaration
protected virtual void OnPointerPressed(PointerRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.PointerRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnPointerReleased(PointerRoutedEventArgs, RowColumnIndex)
Occurs when the pointer released.
Declaration
protected virtual void OnPointerReleased(PointerRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.PointerRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
OnTapped(TappedRoutedEventArgs, RowColumnIndex)
Occurs when the pointer tapped in the cell.
Declaration
protected virtual void OnTapped(TappedRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.TappedRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.TappedRoutedEventArgs 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(PointerRoutedEventArgs, RowColumnIndex)
Used to process the pointer/touch selection on Header(whole row/column).
Declaration
protected virtual void ProcessHeaderSelection(PointerRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.PointerRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessKeyNavigation(KeyRoutedEventArgs)
Used to process the key navigation in SfCellGrid.
Declaration
protected virtual bool ProcessKeyNavigation(KeyRoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | args | An instance of Windows.UI.Xaml.Input.KeyRoutedEventArgs that contains data. |
Returns
Type |
---|
System.Boolean |
ProcessPointerSelection(PointerRoutedEventArgs, RowColumnIndex)
Used to process the pointer/touch normal selection.
Declaration
protected virtual void ProcessPointerSelection(PointerRoutedEventArgs e, RowColumnIndex rowcolIndex)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | An instance of Windows.UI.Xaml.Input.PointerRoutedEventArgs that contains data. |
RowColumnIndex | rowcolIndex | An instance of RowColumnIndex. |
ProcessShiftKeyNavigation(KeyRoutedEventArgs)
Used to process the key navigation when shift key is pressed.
Declaration
protected virtual void ProcessShiftKeyNavigation(KeyRoutedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | args | An instance of Windows.UI.Xaml.Input.KeyRoutedEventArgs 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()