I am trying to change the background of cell using some condition. I am using the DataGrid.LoadingRow
event to achieve it. But I get an error when casting a row to DataGridCellPresenter
. The error is
The non-generic method 'System.Windows.FrameworkElement.GetVisualChild(int)' cannot be used with type arguments".
Below is a screenshot of the error