title: How To Change Button Style?
body: <p>I have this button:</p>
  
  <pre><code>&lt;Button HorizontalAlignment="Stretch" Content="EXIT" Style="{StaticResource RedButton}" /&gt;
  </code></pre>
  
  <p>and its style:</p>
  
  <pre><code>&lt;Style x:Key="RedButton" TargetType="Button"&gt;
      &lt;Setter Property="Background" Value="Red" /&gt;
      &lt;Setter Property="Template"&gt;                
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="Button"&gt;                        
                  &lt;Grid&gt;
                      &lt;VisualStateManager.VisualStateGroups&gt;
                          &lt;VisualStateGroup x:Name="CommonStates"&gt;
                              &lt;VisualState x:Name="Pressed"&gt;
                                  &lt;Storyboard&gt;
                                      &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background"&gt;
                                          &lt;DiscreteObjectKeyFrame KeyTime="0" Value="Red" /&gt;
                                      &lt;/ObjectAnimationUsingKeyFrames&gt;
                                  &lt;/Storyboard&gt;
                              &lt;/VisualState&gt;
                          &lt;/VisualStateGroup&gt;
                      &lt;/VisualStateManager.VisualStateGroups&gt;                            
                  &lt;/Grid&gt;                        
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;                
      &lt;/Setter&gt;            
  &lt;/Style&gt;
  </code></pre>
  
  <p>But all it does it complain, on the button: "Cannot resolve TargetName Border"</p>
  
  <p>I'm trying to style the pressed visual state for the button. Does anyone know whats wrong?</p>