title: How to use a trigger on ToggleButton.IsChecked or IsPressed correctly?
body: <p>That's my code:</p>
  
  <pre><code>&lt;Window x:Class="WpfTests.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Window.Resources&gt;
      &lt;Thickness x:Key="tasksMargin"&gt;0,10,0,0&lt;/Thickness&gt;
  
  &lt;/Window.Resources&gt;
  &lt;Grid&gt;
      &lt;DockPanel HorizontalAlignment="Left"&gt;
          &lt;!--&lt;Border Padding="15"&gt;--&gt;
          &lt;GroupBox&gt;
              &lt;GroupBox.Header&gt;
                  Database Tasks
              &lt;/GroupBox.Header&gt;
              &lt;StackPanel Width="Auto" &gt;
                  &lt;StackPanel.Resources&gt;
                      &lt;Style  TargetType="RadioButton"&gt;
                          &lt;Setter Property="Template"&gt;
                              &lt;Setter.Value&gt;
                                  &lt;ControlTemplate TargetType="RadioButton"&gt;
                                      &lt;ToggleButton IsChecked="{Binding IsChecked, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                        Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                    BorderThickness="2" BorderBrush="Yellow" Background="White"/&gt;
                                      &lt;ControlTemplate.Triggers&gt;
                                          &lt;Trigger Property="ToggleButton.IsChecked" Value="True"&gt;
                                                  &lt;Setter Property="Content" Value="different txt" /&gt;
                                              &lt;/Trigger&gt;
                                          &lt;Trigger Property="ToggleButton.IsPressed" Value="True"&gt;
                                                  &lt;Setter Property="Content" Value="different text" /&gt;
                                              &lt;/Trigger&gt;
                                      &lt;/ControlTemplate.Triggers&gt;
                                  &lt;/ControlTemplate&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                          &lt;Setter Property="Margin" Value="5"&gt;
                          &lt;/Setter&gt;
                      &lt;/Style&gt;
                  &lt;/StackPanel.Resources&gt;
  
                  &lt;RadioButton  GroupName="Group1"  x:Name="button1"&gt;Option1&lt;/RadioButton&gt;
                  &lt;RadioButton  GroupName="Group1" x:Uid="button2" x:Name="button2"&gt;button2&lt;/RadioButton&gt;
                  &lt;RadioButton  GroupName="Group1" x:Uid="button3" x:Name="button3"&gt;button3&lt;/RadioButton&gt;
              &lt;/StackPanel&gt;
          &lt;/GroupBox&gt;
      &lt;/DockPanel&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, the IsChecked and IsPressed triggers do not get triggered. how to I declare them properly?</p>