Table of Contents

Class TableViewCell

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Represents a cell in a TableView.

[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "PointerOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Regular", GroupName = "CurrentStates")]
[TemplateVisualState(Name = "Current", GroupName = "CurrentStates")]
[TemplateVisualState(Name = "Selected", GroupName = "SelectionStates")]
[TemplateVisualState(Name = "Unselected", GroupName = "SelectionStates")]
[GeneratedBindableCustomProperty]
[WinRTRuntimeClassName("Microsoft.UI.Xaml.IUIElementOverrides")]
[WinRTExposedType(typeof(WinUI_TableView_TableViewRowWinRTTypeDetails))]
public class TableViewCell : ContentControl, IWinRTObject
Inheritance
object
DependencyObject
UIElement
FrameworkElement
Control
ContentControl
TableViewCell
Implements
IWinRTObject

Constructors

TableViewCell()

Initializes a new instance of the TableViewCell class.

public TableViewCell()

Properties

Column

Gets or sets the column for the cell.

public TableViewColumn? Column { get; }

Property Value

TableViewColumn

IsCurrent

Gets a value indicating whether the cell is the current cell.

public bool IsCurrent { get; }

Property Value

bool

IsReadOnly

Gets a value indicating whether the cell is read-only.

public bool IsReadOnly { get; }

Property Value

bool

IsSelected

Gets a value indicating whether the cell is selected.

public bool IsSelected { get; }

Property Value

bool

Row

Gets or sets the row for the cell.

public TableViewRow? Row { get; }

Property Value

TableViewRow

Slot

Gets the slot for the cell.

public TableViewCellSlot Slot { get; }

Property Value

TableViewCellSlot

TableView

Gets or sets the TableView for the cell.

public TableView? TableView { get; }

Property Value

TableView

Methods

MeasureOverride(Size)

Provides the behavior for the "Measure" pass of the layout cycle. Classes can override this method to define their own "Measure" pass behavior.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available.

Returns

Size

The size that this object determines it needs during layout, based on its calculations of the allocated sizes for child objects or based on other considerations such as a fixed container size.

OnApplyTemplate()

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

protected override void OnApplyTemplate()

OnContentChanged(object, object)

Invoked when the value of the Content property changes.

protected override void OnContentChanged(object oldContent, object newContent)

Parameters

oldContent object

The old value of the Content property.

newContent object

The new value of the Content property.

OnCreateAutomationPeer()

When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The class-specific AutomationPeer subclass to return.

OnDoubleTapped(DoubleTappedRoutedEventArgs)

Called before the DoubleTapped event occurs.

protected override void OnDoubleTapped(DoubleTappedRoutedEventArgs e)

Parameters

e DoubleTappedRoutedEventArgs

Event data for the event.

OnManipulationDelta(ManipulationDeltaRoutedEventArgs)

Called before the ManipulationDelta event occurs.

protected override void OnManipulationDelta(ManipulationDeltaRoutedEventArgs e)

Parameters

e ManipulationDeltaRoutedEventArgs

Event data for the event.

OnPointerCaptureLost(PointerRoutedEventArgs)

Called before the PointerCaptureLost event occurs.

protected override void OnPointerCaptureLost(PointerRoutedEventArgs e)

Parameters

e PointerRoutedEventArgs

Event data for the event.

OnPointerEntered(PointerRoutedEventArgs)

Called before the PointerEntered event occurs.

protected override void OnPointerEntered(PointerRoutedEventArgs e)

Parameters

e PointerRoutedEventArgs

Event data for the event.

OnPointerExited(PointerRoutedEventArgs)

Called before the PointerExited event occurs.

protected override void OnPointerExited(PointerRoutedEventArgs e)

Parameters

e PointerRoutedEventArgs

Event data for the event.

OnPointerPressed(PointerRoutedEventArgs)

Called before the PointerPressed event occurs.

protected override void OnPointerPressed(PointerRoutedEventArgs e)

Parameters

e PointerRoutedEventArgs

Event data for the event.

OnPointerReleased(PointerRoutedEventArgs)

Called before the PointerReleased event occurs.

protected override void OnPointerReleased(PointerRoutedEventArgs e)

Parameters

e PointerRoutedEventArgs

Event data for the event.

OnTapped(TappedRoutedEventArgs)

Called before the Tapped event occurs.

protected override void OnTapped(TappedRoutedEventArgs e)

Parameters

e TappedRoutedEventArgs

Event data for the event.