Table of Contents

Class TableViewTemplateColumn

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Represents a column in a TableView that uses a DataTemplate for its content.

[GeneratedBindableCustomProperty]
[ContentProperty(Name = "CellTemplate")]
public class TableViewTemplateColumn : TableViewColumn, IWinRTObject
Inheritance
object
DependencyObject
TableViewTemplateColumn
Implements
IWinRTObject
Inherited Members

Constructors

TableViewTemplateColumn()

Initializes a new instance of the TableViewTemplateColumn class.

public TableViewTemplateColumn()

Fields

CellTemplateProperty

Identifies the CellTemplate dependency property.

public static readonly DependencyProperty CellTemplateProperty

Field Value

DependencyProperty

CellTemplateSelectorProperty

Identifies the CellTemplateSelector dependency property.

public static readonly DependencyProperty CellTemplateSelectorProperty

Field Value

DependencyProperty

EditingTemplateProperty

Identifies the EditingTemplate dependency property.

public static readonly DependencyProperty EditingTemplateProperty

Field Value

DependencyProperty

EditingTemplateSelectorProperty

Identifies the EditingTemplateSelector dependency property.

public static readonly DependencyProperty EditingTemplateSelectorProperty

Field Value

DependencyProperty

Properties

CellTemplate

Gets or sets the DataTemplate for the cell content.

public DataTemplate? CellTemplate { get; set; }

Property Value

DataTemplate

CellTemplateSelector

Gets or sets the DataTemplateSelector for the cell content.

public DataTemplateSelector? CellTemplateSelector { get; set; }

Property Value

DataTemplateSelector

EditingTemplate

Gets or sets the DataTemplate for the editing cell content.

public DataTemplate? EditingTemplate { get; set; }

Property Value

DataTemplate

EditingTemplateSelector

Gets or sets the DataTemplateSelector for the editing cell content.

public DataTemplateSelector? EditingTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Methods

GenerateEditingElement(TableViewCell, object?)

Generates a ContentControl for editing the cell based on EditingTemplate and EditingTemplateSelector. If EditingTemplate or EditingTemplateSelector is not set, GenerateElement is used instead to generate the editing element.

public override FrameworkElement GenerateEditingElement(TableViewCell cell, object? dataItem)

Parameters

cell TableViewCell

The cell for which the editing element is generated.

dataItem object

The data item associated with the cell.

Returns

FrameworkElement

A ContentControl element.

GenerateElement(TableViewCell, object?)

Generates a ContentControl for the cell based on CellTemplate and CellTemplateSelector.

public override FrameworkElement GenerateElement(TableViewCell cell, object? dataItem)

Parameters

cell TableViewCell

The cell for which the element is generated.

dataItem object

The data item associated with the cell.

Returns

FrameworkElement

A ContentControl element.

RefreshElement(TableViewCell, object?)

Refreshes the display element for the cell.

public override void RefreshElement(TableViewCell cell, object? dataItem)

Parameters

cell TableViewCell

The cell for which the element is refreshed.

dataItem object

The data item associated with the cell.