title: Trigger with target name
body: <p>I have a couple text boxes and collection of radio buttons in WPF. I want to use the trigger to set the IsChecked property of oly one radio button which has a name if any text boxes get focus. I check a few examples but I could not find what I looking for. 
  Remember, we are using MVVM pattern and no code behind.</p>
  
  <p>I tried the following codes and have this compile error:</p>
  
  <p>TargetName property cannot be set on a Style Setter</p>
  
  <pre><code>&lt;UserControl.Resources&gt;
              &lt;Style x:Name="myTest" TargetType="TextBox"&gt;
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                          &lt;Setter Property="RadioButton.IsChecked" Value="True"  TargetName="myRadioButton"&gt;&lt;/Setter&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>I read other posts and DataTrigger fix the problem.</p>
  
  <pre><code> &lt;Style x:Name="myTest2" TargetType="RadioButton" &gt;
       &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding IsFocused, ElementName=myTextBox}" Value="True"&gt;
             &lt;Setter Property="IsChecked"  Value="True" &gt;&lt;/Setter&gt;
          &lt;/DataTrigger&gt;      
      &lt;/Style.Triggers&gt;
   &lt;/Style&gt;
  </code></pre>