Table of Contents

Class TableViewConditionalCellStyle

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Represents a conditional style for a table view cell that is applied when a specified predicate evaluates to true.

[ContentProperty(Name = "Style")]
[StyleTypedProperty(Property = "Style", StyleTargetType = typeof(TableViewCell))]
public class TableViewConditionalCellStyle : DependencyObject, IWinRTObject
Inheritance
object
DependencyObject
TableViewConditionalCellStyle
Implements
IWinRTObject

Remarks

Use this class to define styles that are conditionally applied to cells in a table view based on custom logic. The style is only applied to cells for which the predicate returns true. Multiple conditional styles can be used to support complex styling scenarios.

Fields

PredicateProperty

Identifies the Predicate dependency property.

public static readonly DependencyProperty PredicateProperty

Field Value

DependencyProperty

StyleProperty

Identifies the Style dependency property.

public static readonly DependencyProperty StyleProperty

Field Value

DependencyProperty

Properties

Predicate

Gets or sets the predicate that determines whether the style should be applied to a given cell.

public Predicate<TableViewConditionalCellStyleContext>? Predicate { get; set; }

Property Value

Predicate<TableViewConditionalCellStyleContext>

Style

Gets or sets the style to be applied to the table view cell when the predicate evaluates to true.

public Style? Style { get; set; }

Property Value

Style