I've got an SFDatagrid that runs an animation when cell contents are changed using a style:
<Style x:Key="currRunDataCellStyle" TargetType="TextBlock">
<Setter Property="Background" Value="#FFC5D9F1" />
<Style.Triggers>
<EventTrigger RoutedEvent="Binding.TargetUpdated">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<!--Change the cell colour (of the one being updated) from Red to Normal-->
<ColorAnimation Duration="0:0:2" Storyboard.TargetProperty="Background.Color" From="Red" To="#FFC5D9F1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
The only problem is that the animation fires when I scroll the grid as well. The data hasn't changed, but the animation still kicks off. Is there anyway to stop the grid from doing this?
Cheers,
Rob