I have a WPF datagrid that is filled with an ObserverableCollection.
Now I want to color the rows depending on the row content at the program start and if something changes during runtime.
System.Windows.Controls.DataGrid areaDataGrid = ...;
//adding items to areas collection
areaDataGrid.ItemsSource = areas;
areaDataGrid.Rows <-- 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?