Example #1
0
 private static void HighlightCell(DataGridCell cell, bool isHighlighted)
 {
     if (isHighlighted)
     {
         cell.Background = Brushes.LightBlue;
         cell.Foreground = Brushes.Black;
     }
     else
     {
         cell.ClearValue(BackgroundProperty);
         cell.ClearValue(ForegroundProperty);
     }
 }
Example #2
0
 public void CellUnselected(DataGridCell cell)
 {
     //Cell border size is 0, only clear background.
     cell.ClearValue(DataGridCell.BackgroundProperty);
 }