title: Change WPF Datagrid Row Color
body: <p>I have a WPF datagrid that is filled with an ObserverableCollection.</p>
  
  <p>Now I want to color the rows depending on the row content at the program start and if something changes during runtime. </p>
  
  <pre><code>System.Windows.Controls.DataGrid areaDataGrid = ...;
  ObservableCollection&lt;Area&gt; areas;
  //adding items to areas collection
  areaDataGrid.ItemsSource = areas;
  
  areaDataGrid.Rows  &lt;-- Property not available. how to access rows here?
  
  CollectionView myCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(areaDataGrid.Items);
  ((INotifyCollectionChanged)myCollectionView).CollectionChanged += new NotifyCollectionChangedEventHandler(areaDataGrid_Changed);
  ...
  
  void areaDataGrid_Changed(object sender, NotifyCollectionChangedEventArgs e)
  {
      //how to access changed row here?
  }
  </code></pre>
  
  <p>How can I access the rows at start and runtime?</p>