Class TableViewToggleSwitchColumn
Represents a column in a TableView that displays a ToggleSwitch.
[StyleTypedProperty(Property = "ElementStyle", StyleTargetType = typeof(ToggleSwitch))]
[GeneratedBindableCustomProperty]
public class TableViewToggleSwitchColumn : TableViewBoundColumn, IWinRTObject
- Inheritance
-
objectDependencyObjectTableViewToggleSwitchColumn
- Implements
-
IWinRTObject
- Inherited Members
Constructors
TableViewToggleSwitchColumn()
Initializes a new instance of the TableViewToggleSwitchColumn class.
public TableViewToggleSwitchColumn()
Fields
OffContentProperty
Identifies the OffContent dependency property.
public static readonly DependencyProperty OffContentProperty
Field Value
- DependencyProperty
OnContentProperty
Identifies the OnContent dependency property.
public static readonly DependencyProperty OnContentProperty
Field Value
- DependencyProperty
Properties
OffContent
Gets or sets the content to display when the ToggleSwitch is off.
public object? OffContent { get; set; }
Property Value
- object
OnContent
Gets or sets the content to display when the ToggleSwitch is on.
public object? OnContent { get; set; }
Property Value
- object
Methods
EndCellEditing(TableViewCell, object?, TableViewEditAction, object?)
Called to end the editing session for the cell.
protected override void EndCellEditing(TableViewCell cell, object? dataItem, TableViewEditAction editAction, object? uneditedValue)
Parameters
cellTableViewCellThe cell whose editing session is being ended.
dataItemobjectThe data item associated with the cell.
editActionTableViewEditActionThe edit action.
uneditedValueobjectThe unedited value of the cell.
GenerateEditingElement(TableViewCell, object?)
Generates an editing element for the cell.
public override FrameworkElement GenerateEditingElement(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the editing element is generated.
dataItemobjectThe data item associated with the cell.
Returns
- FrameworkElement
A FrameworkElement representing the editing element.
GenerateElement(TableViewCell, object?)
Generates a ToggleSwitch element for the cell.
public override FrameworkElement GenerateElement(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the element is generated.
dataItemobjectThe data item associated with the cell.
Returns
- FrameworkElement
A ToggleSwitch element.
PrepareCellForEdit(TableViewCell, RoutedEventArgs)
Called to prepare the cell for editing.
protected override object? PrepareCellForEdit(TableViewCell cell, RoutedEventArgs routedEvent)
Parameters
cellTableViewCellThe cell to prepare for editing.
routedEventRoutedEventArgsThe routed event.
Returns
- object
Should return the unedited cell value.
UpdateElementState(TableViewCell, object?)
Updates the state of the element for the cell.
public override void UpdateElementState(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the element state is updated.
dataItemobjectThe data item associated with the cell.