I have a XamDataGrid bound to an ObservableCollection<Person>. I want to apply an animation to any new items added to the grid and, because I'm usign MVVM and am building the animation purely in XAML, I need to bind the Style trigger to a grid event so simply hooking the ObservableCollection's CollectionChanged event doesn't seem to apply, especially as records may be deleted as well as added.
Hello BarraCoder,
You can use the CollectionChanged event and interrogate the NotifyCollectionChangedEventArgs.Action property to determine whether a new item was added or not.