Currently I have the following code to flash a DataGrid cell when it's value changes:
<TextBlock Background="White" Text={Binding Date, NotifyOnTargetUpdated=True} >
<EventTrigger RoutedEvent="Binding.TargetUpdated" >
<BeginStoryboard>
<Storyboard>
<ColorAnimation AutoReverse="True" From="#1F1F1F" To="#FFFF88" Duration="0:0:0.2" Storyboard.TargetProperty="Background.Color" FillBehavior="Stop" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</TextBlock>
Now I need to execute this animation only if a boolean value of the viewmodel is true. How can I accomplish this?
EDIT: Extended the sample
Thanks.