<igCA:Series.Animation>
<igCA:Animation Style="{DynamicResource PieChartAnimationStyle}"></igCA:Animation>
</igCA:Series.Animation>
My animation style is defined in an external xaml file. I tried binding the IsEnabled property of the Animation, but it seems that the IsEnabled property does not have any effect on whether or not the animation runs.
Is there way to turn the animation on and off through binding?
John Myczek
That's exactly what I needed. Thanks.
try using the Duration property instead. here i define the style as referring to a static resource; you can use whatever logic you need to replace the binding.
<Window.Resources> <sys:Boolean x:Key="MyBool">True</sys:Boolean> <Style x:Key="PieChartAnimationStyle" TargetType="{x:Type igCA:Animation}"> <Style.Triggers> <DataTrigger Binding="{Binding Source={StaticResource MyBool}}" Value="True"> <Setter Property="Duration" Value="0:0:0" /> </DataTrigger> <DataTrigger Binding="{Binding Source={StaticResource MyBool}}" Value="False"> <Setter Property="Duration" Value="0:0:1" /> </DataTrigger> </Style.Triggers> </Style> </Window.Resources>