title: WPF button padding not respected when applying a style
body: <p>I'm having issues finding out why my padding is not being respected on the button when applying a style (with no padding attribtues).</p>
  <h3>Resource Dictionary</h3>
  <pre><code>&lt;Style x:Key=&quot;NoHoverDisabledButton&quot; TargetType=&quot;{x:Type Button}&quot;&gt;
      &lt;Setter Property=&quot;Background&quot; Value=&quot;#ccc&quot;/&gt;
      &lt;Setter Property=&quot;Foreground&quot; Value=&quot;Black&quot;/&gt;
      &lt;Setter Property=&quot;Template&quot;&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType=&quot;{x:Type Button}&quot;&gt;
                  &lt;Border Background=&quot;{TemplateBinding Background}&quot;&gt;
                      &lt;ContentPresenter HorizontalAlignment=&quot;Center&quot; VerticalAlignment=&quot;Center&quot;/&gt;
                  &lt;/Border&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  <h3>Button:</h3>
  <pre><code>&lt;Button Style=&quot;{StaticResource ResourceKey=NoHoverDisabledButton}&quot; Padding=&quot;20,0&quot; x:Name=&quot;OnlineUpdateButton&quot; Width=&quot;Auto&quot; HorizontalAlignment=&quot;Right&quot; BorderThickness=&quot;0&quot; Height=&quot;32&quot; VerticalAlignment=&quot;Top&quot; FontSize=&quot;14&quot;&gt;
      &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;
          ...
      &lt;/StackPanel&gt;
  &lt;/Button&gt;
  </code></pre>
  <h3>Result with style applied</h3>
  <p><a href="https://i.stack.imgur.com/SYW0f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYW0f.png" alt="enter image description here" /></a></p>
  <h3>Result when simply removing style from button</h3>
  <p><a href="https://i.stack.imgur.com/pEpiM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pEpiM.png" alt="enter image description here" /></a></p>
  <p>What am I missing here?</p>