title: WPF on trigger do multiple setters on different controls
body: <p>I got a grid with a label, a button and a Textbox in it. I want to set the label forground to red &amp; the button property "IsEnabled" To False if the value of the label.Content = "Invalid". However I am not able to set the setter to the targetname in this datatrigger because
  "Targetame property cannot be set on a Style Setter." How can I fix this so I can use setters for multiple elements with just 1 trigger, I know I can go and put a exact the same datatrigger in the Button.Styletriggers but perhaps there is a better way to do tihs?</p>
  
  <pre><code>   &lt;Button Content="Save" Click="btnsave_Click" Grid.Column="1" Grid.Row="2" x:Name="btnsave" IsEnabled="True" /&gt;
              &lt;Label Content="{Binding ElementName=txtclc, Path=Text, Converter={StaticResource convertcode}}" Name="lblcheckclc"  Grid.Row="1" Grid.Column="2"&gt;
                  &lt;Label.Resources&gt;
                      &lt;Style TargetType="{x:Type Label}"&gt;
                          &lt;Setter Property="Foreground" Value="Green" /&gt;
  
                          &lt;Style.Triggers&gt;
                              &lt;DataTrigger  Binding="{Binding ElementName=lblcheckclc, Path=Content}" Value="Invalid"&gt;
                                  &lt;Setter Property="Foreground" Value="Red" /&gt;
                                  &lt;Setter TargetName="btnsave" Property="IsEnabled" Value="False"  /&gt; &lt;!--This line is the problem--&gt;
  
                              &lt;/DataTrigger&gt;
                          &lt;/Style.Triggers&gt;
                      &lt;/Style&gt;
                  &lt;/Label.Resources&gt;
              &lt;/Label&gt;
  </code></pre>
  
  <p>PS: If I comment the 2nd setter then it works, (if the value of the label = "Invalid" then the forground becomes red</p>