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); } }
public void CellUnselected(DataGridCell cell) { //Cell border size is 0, only clear background. cell.ClearValue(DataGridCell.BackgroundProperty); }