I have a log window with a datagrid, each entry write to new row in the datagrid.
I want to set the row color accordingly to the severity of the log message (e.g. fatal exception = Red , Information = Green).
How do i can do it with binding or dynamic resource?
Thanks in advance!
Assuming that this is not for Silverlight, you can use DataTriggers.
Assume
Severityis exposed as a property from your items…For silverlight you should use converters…
In StatusToColorConveter.Convert() method …
Let me know if this helps.