I was wondering if this possible. I have this datagrid contains 3 columns and 2 rows. What I want is to change the background of the URL column on my datagrid according to the d
Your rowColor
should not return a string (i would rename it to RowColor
since it is public), just return the actual colour-brushes instead. (Your colours are wrong by the way, the first is opaque black and the second is transparent blue)
e.g.
public Brush rowColor { get; set; }
data1.rowColor = Brushes.Red;
data2.rowColor = Brushes.Blue;
If you really need to parse from string you could use a value converter or the standard conversion that is used when parsing Xaml.
Besides that i am not sure if binding those properties to Foreground
of the column will work.