title: How to set row Background color for WPF DataGrid Programmatically (WPF & C#) based on the value in the DataGrid
body: <p>I have a WPF Datagrid binded with list of interface objects.
  Consider, ClsEmployee class implements I_Employee interface with properties Empl_Id, Empl_Name, Department, Address and City_name.</p>
  
  <p>List _emplList;</p>
  
  <p>consider, _emplList has 10 items.</p>
  
  <p>dgEmployeeGrid.ItemsSource = _emplList;</p>
  
  <p>Question:
  Now, if the user clicks on a button, then i should be able to read the City_name. Based on the City_name, i should be able to set the color (Color can be different for each row) for the rows dynamically through C# code.</p>
  
  <p>Please help me how to do this?</p>
  
  <p>Thanks in advance!</p>