Hi,
I am trying to use style triggers in silverlight like so:
<Path Canvas.Top="20" Stroke="#FF808080" Data="M 0,20 20,0 40,20 Z" StrokeLineJoin="Round">
<Path.Style>
<Style TargetType="{x:Type Path}">
<Setter Property="Fill" Value="DarkGray"/>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=userControl, Path=PumpRunning}" Value="True">
<Setter Property="Fill" Value="DarkGreen"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
I want to do this so that the fill value of the path changes if the pump is running or not. The problem is that style triggers are not supported in silverlight!
So is there anyway round this? Is there some way of doing this in code? I have looked into it but I am stumped.
Thanks
Ian