title: Style triggers in Silverlight
body: <p>I am trying to use style triggers in silverlight like so:</p>
  
  <pre><code>   &lt;Path Canvas.Top="20" Stroke="#FF808080" Data="M 0,20 20,0 40,20 Z" StrokeLineJoin="Round"&gt;
          &lt;Path.Style&gt;
              &lt;Style TargetType="{x:Type Path}"&gt;
                  &lt;Setter Property="Fill" Value="DarkGray"/&gt;
                  &lt;Style.Triggers&gt;
                      &lt;DataTrigger Binding="{Binding ElementName=userControl, Path=PumpRunning}" Value="True"&gt;
                          &lt;Setter Property="Fill" Value="DarkGreen"/&gt;        
                      &lt;/DataTrigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/Path.Style&gt;
      &lt;/Path&gt;
  </code></pre>
  
  <p>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! </p>
  
  <p>So is there anyway round this? Is there some way of doing this in code? I have looked into it but I am stumped.</p>
  
  <p>Thanks</p>
  
  <p>Ian</p>