I have a method which comparing data in two dataTable. After comparing I´d like to visualizing these compared data (which are in new DataTable called ChangeTab) in WPF dataGRID.
I´m filling datagrid from DataContext:
win.TableOfChange.DataContext = ChangeTab.DefaultView;
<DataGrid ItemsSource="{Binding}" Height="107" HorizontalAlignment="Left"....
I´m fighting with problem, how to visualize data which are different (in the DataTables) by red, and data which are the same with green color – similar like is in the picture:

Is there is a way, how to do that (Set colour to WPF dataGRID cell for some red and some green from C#)?
Thanks a lot!
I presume that you build the source table in the comparison process, if so you can easily store a boolean value that indicates equality. Then in the
CellStyleyou can use aDataTriggeron that property and have aSetterchange theTextElement.Foregroundproperty to the desired value.