title: Stretching not applying in a WPF templated Button
body: <p><strong>I created a templated button in WPF :</strong> </p>
  
  <pre><code>&lt;ControlTemplate TargetType="{x:Type Button}"
                   x:Key="BoutonGris"&gt;
    &lt;Button  Foreground="White"
             BorderBrush="Transparent"
             HorizontalAlignment="Center"
             VerticalAlignment="Center"
             HorizontalContentAlignment="Stretch"
             VerticalContentAlignment="Stretch"&gt;
      &lt;Button.Content&gt;
        &lt;Border CornerRadius="3"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"&gt;
          &lt;ContentPresenter /&gt;
          &lt;Border.Style&gt;
            &lt;Style TargetType="{x:Type Border}"&gt;
              &lt;Setter Property="Background"
                      Value="#58585a" /&gt;
              &lt;Style.Triggers&gt;
                &lt;Trigger Property="IsMouseOver"
                         Value="True"&gt;
                  &lt;Setter Property="Background"
                          Value="{DynamicResource DegradeCouleurTheme}" /&gt;
                &lt;/Trigger&gt;
              &lt;/Style.Triggers&gt;
            &lt;/Style&gt;
          &lt;/Border.Style&gt;
        &lt;/Border&gt;
      &lt;/Button.Content&gt;
      &lt;Button.Style&gt;
        &lt;Style TargetType="{x:Type Button}"&gt;
          &lt;Setter Property="Template"&gt;
            &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                &lt;ContentPresenter /&gt;
              &lt;/ControlTemplate&gt;
            &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
        &lt;/Style&gt;
      &lt;/Button.Style&gt;
    &lt;/Button&gt;
  &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p><strong>I use this button in my Window :</strong></p>
  
  <pre><code>&lt;Button x:Name="BtnRestoreDefault" Template="{DynamicResource BoutonGris}" Content="Rest. défaut" Height="27"  Width="88" Click="Button_Click_RestoreDefault"/&gt;
  </code></pre>
  
  <p>My problem is that the button don't appear to have the Height="27" and Width="88".</p>
  
  <p><strong>Here is my result in VS2012 :</strong></p>
  
  <p><img src="https://i.stack.imgur.com/wOnUJ.png" alt=""></p>
  
  <p>The button has the good size, but the gray area don't. I have use the Stretch keywords on the Template but i don't find the mistake.</p>
  
  <p>If i use Stretch for HorizontalAlignment, HorizontalContentAlignment, VerticalAlignment, and VerticalContentAlignment, the gray has the good size, but, the text content is in left/up ! I would like a center text. </p>
  
  <p>Anyone have an idea please ?</p>
  
  <p>Thanks a lot,</p>
  
  <p>Best regards,</p>
  
  <p>Nixeus</p>