WPF - Making an animation's execution conditional on a property of the bound data item
问题 I have a data object -- a custom class called Notification -- that exposes a IsCritical property. The idea being that if a notification will expire, it has a period of validity and the user's attention should be drawn towards it. Imagine a scenario with this test data: _source = new[] { new Notification { Text = "Just thought you should know" }, new Notification { Text = "Quick, run!", IsCritical = true }, }; The second item should appear in the ItemsControl with a pulsing background. Here's