title: WPF ToggleButton XAML styling
body: <p>So I have two toggle buttons that I am trying to combine - sort of.  So the first button toggles the images based on whether it IsChecked is true or false, but this button has a border around it that I can't get rid of.</p>
  
  <p>The second toggle button doesn't have a border and doesn't blink when clicked, but it also doesn't change images based on it's state.  </p>
  
  <p>What I want is the best of both worlds.  Change the image AND get rid of the border.  I have tried exactly 23 things and none of them work.</p>
  
  <p>Here is the code I am using:</p>
  
  <pre><code>&lt;ToggleButton x:Name="changeButBorderedBlinky" Margin="0,12,194,0" Width="82" Height="82" Background="Transparent" Padding="-1"  Focusable="false" VerticalAlignment="Top" HorizontalAlignment="Right"&gt;
  
          &lt;ToggleButton.Style&gt;
              &lt;Style TargetType="{x:Type ToggleButton}"&gt;
                  &lt;Setter Property="Content"&gt;
                      &lt;Setter.Value&gt;
                          &lt;Border BorderThickness="0"  &gt;
                              &lt;Image Source="images/buttonimages/back2.png" Stretch="Fill"  /&gt;
                          &lt;/Border&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="IsChecked" Value="True"&gt;
                          &lt;Setter Property="Content"&gt;
                              &lt;Setter.Value&gt;
                                  &lt;Border  BorderThickness="0" &gt;
                                      &lt;Image Source="images/buttonimages/back.png" Stretch="fill" /&gt;
                                  &lt;/Border&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/ToggleButton.Style&gt;
  
      &lt;/ToggleButton&gt;
      &lt;ToggleButton x:Name="noChangeNoBorder"  Margin="0,12,104,0" VerticalAlignment="Top" HorizontalAlignment="Right" Height="80" Width="80" &gt;
          &lt;ToggleButton.Template&gt;
              &lt;ControlTemplate TargetType="{x:Type ToggleButton}"&gt;
                  &lt;Border x:Name="border"  &gt;
                      &lt;Image x:Name="img" Source="images/buttonimages/back2.png"  /&gt;
                  &lt;/Border&gt;
              &lt;/ControlTemplate&gt;
          &lt;/ToggleButton.Template&gt;
  
      &lt;/ToggleButton&gt;
  </code></pre>
  
  <p>Thanks for any help on this. It's driving me insane.</p>