How to trigger a storyboard on property changed

I would like to start the storyboard when the value of MyCounter changes.
With a DataTrigger I can only run a specific value.

 <DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=MyCounter}" Value="Doesn't matter"> <BeginStoryboard Storyboard="{StaticResource myStoryboard}"/> </DataTrigger> </DataTemplate.Triggers> 
+8
wpf storyboard datatrigger
source share
1 answer

You can use EventTrigger with the TargetUpdated event to trigger a storyboard instead of a DataTrigger. See here for an example.

+13
source share

All Articles