Hi,
I'm trying to perform a color animation on the fill property of a polygon and getting this error - Cannot convert the value in attribute 'Style' to object of type 'System.Windows.Style'. Cannot resolve all property references in the property path 'Fill.Color'. Verify that applicable objects support the properties. Error at object 'System.Windows.Shapes.Polygon' in markup file.
Any ideas? Please see below my XAML style. Thanks.
<Style TargetType="{x:Type Polygon}" x:Key="ArrowStyle">
<Style.Triggers>
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource NumberIsLessThanParameter}">
<Binding Path="Value" Mode="OneWay"/>
<Binding Path="OldValue" Mode="OneWay"/>
</MultiBinding>
</DataTrigger.Binding>
<DataTrigger.EnterActions>
<BeginStoryboard Name="ToRedArrow">
<Storyboard TargetProperty="Fill.Color">
<ColorAnimation From="Transparent" To="Red" Duration="0:0:2" AutoReverse="False" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Value="False">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource NumberIsLessThanParameter}">
<Binding Path="Value" Mode="OneWay"/>
<Binding Path="OldValue" Mode="OneWay"/>
</MultiBinding>
</DataTrigger.Binding>
<DataTrigger.EnterActions>
<BeginStoryboard Name="ToBlueArrow">
<Storyboard TargetProperty="Fill.Color">
<ColorAnimation From="Transparent" To="Blue" Duration="0:0:2" AutoReverse="False"/>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>