Class GridCellToggleSwitchRenderer
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Grid.Cells
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public class GridCellToggleSwitchRenderer : GridVirtualizingCellRenderer<ToggleSwitch, ToggleSwitch>, IGridCellRenderer, IDisposable
Constructors
GridCellToggleSwitchRenderer()
Initializes a new instance of the GridCellToggleSwitchRenderer class.
Declaration
public GridCellToggleSwitchRenderer()
Methods
CanCheckAddNewRowAtFirstClick()
Method that is used to decide whether AddNewRow ToggleSwitchColumn can get toggle at first click or not.
Declaration
protected virtual bool CanCheckAddNewRowAtFirstClick()
Returns
Type |
---|
System.Boolean |
CanUpdateBinding(GridColumn)
Determines whether the binding for the column can be updated when the data context is set.
Declaration
public override bool CanUpdateBinding(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the binding is updated for the column. |
Overrides
EndEdit(DataColumnBase, Object, Boolean)
Ends the edit occurring on the cell.
Declaration
public override bool EndEdit(DataColumnBase dc, object record, bool canResetBinding = false)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dc | DataColumn which holds GridColumn, RowColumnIndex and GridCell |
System.Object | record | The corresponding record to complete the edit operation. |
System.Boolean | canResetBinding | Specifies whether the binding is reset or not. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the editing is completed ; otherwise, false. |
Overrides
GetControlValue()
Gets the control value.
Declaration
public override object GetControlValue()
Returns
Type |
---|
System.Object |
Overrides
OnEditElementLoaded(Object, RoutedEventArgs)
Invoked when the edit element(ToggleSwitch) is loaded on the cell in column.
Declaration
protected override void OnEditElementLoaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Windows.UI.Xaml.RoutedEventArgs | e | The Windows.UI.Xaml.RoutedEventArgs instance containing the event data. |
Overrides
OnEditElementUnloaded(Object, RoutedEventArgs)
Invoked when the edit element(ToggleSwitch) is unloaded on the cell in column.
Declaration
protected override void OnEditElementUnloaded(object sender, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Windows.UI.Xaml.RoutedEventArgs | e | The Windows.UI.Xaml.RoutedEventArgs instance containing the event data. |
Overrides
OnInitializeEditElement(DataColumnBase, ToggleSwitch, Object)
Called when [initialize edit element].
Declaration
public override void OnInitializeEditElement(DataColumnBase dataColumn, ToggleSwitch uiElement, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn Which holds GridColumn, RowColumnIndex and GridCell |
Windows.UI.Xaml.Controls.ToggleSwitch | uiElement | Corresponding Renderer Element |
System.Object | dataContext | The data context. |
Overrides
OnUnwireEditUIElement(ToggleSwitch)
Unwires the events associated with edit UIElement.
Declaration
protected override void OnUnwireEditUIElement(ToggleSwitch uiElement)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Controls.ToggleSwitch | uiElement | The corresponding edit UIElement to unwire its events. |
Overrides
OnUpdateEditBinding(DataColumnBase, ToggleSwitch, Object)
Called when [update edit binding].
Declaration
public override void OnUpdateEditBinding(DataColumnBase dataColumn, ToggleSwitch element, object dataContext)
Parameters
Type | Name | Description |
---|---|---|
DataColumnBase | dataColumn | DataColumn which holds GridColumn, RowColumnIndex and GridCell |
Windows.UI.Xaml.Controls.ToggleSwitch | element | The element. |
System.Object | dataContext | The data context. |
Overrides
SetControlValue(Object)
Sets the control value.
Declaration
public override void SetControlValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value. |
Overrides
SetFocus(FrameworkElement, Boolean)
Sets the focus to the specified current cell uielement.
Declaration
protected override void SetFocus(FrameworkElement uiElement, bool needToFocus)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.FrameworkElement | uiElement | Specifies the corresponding current cell uielement. |
System.Boolean | needToFocus | Decides whether the focus set to current cell uielement. |
Overrides
ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs)
Let Renderer decide whether the parent grid should be allowed to handle keys and prevent the key event from being handled by the visual UIElement for this renderer. If this method returns true the parent grid will handle arrow keys and set the Handled flag in the event data. Keys that the grid does not handle will be ignored and be routed to the UIElement for this renderer.
Declaration
protected override bool ShouldGridTryToHandleKeyDown(KeyRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.KeyRoutedEventArgs | e | A |
Returns
Type | Description |
---|---|
System.Boolean | True if the parent grid should be allowed to handle keys; false otherwise. |