File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public partial class TableViewCell : ContentControl
3232 private Rectangle ? _v_gridLine ;
3333 private object ? _uneditedValue ;
3434 private RoutedEventArgs ? _editingArgs ;
35+ private IList < TableViewConditionalCellStyle > ? _cellStyles ;
3536
3637 /// <summary>
3738 /// Initializes a new instance of the TableViewCell class.
@@ -537,11 +538,11 @@ internal void EnsureGridLines()
537538 /// <param name="item">The data item associated with the cell.</param>
538539 internal void EnsureStyle ( object ? item )
539540 {
540- IList < TableViewConditionalCellStyle > cellStyles = [
541+ _cellStyles ?? = [
541542 .. Column ? . ConditionalCellStyles ?? [ ] , // Column styles have first priority
542543 .. TableView ? . ConditionalCellStyles ?? [ ] ] ; // TableView styles have second priority
543544
544- Style = cellStyles . FirstOrDefault ( c => c . Predicate ? . Invoke ( new ( Column ! , item ) ) is true ) ?
545+ Style = _cellStyles . FirstOrDefault ( c => c . Predicate ? . Invoke ( new ( Column ! , item ) ) is true ) ?
545546 . Style ?? Column ? . CellStyle ?? TableView ? . CellStyle ;
546547 }
547548
You can’t perform that action at this time.
0 commit comments