title: Button Resources defined in Style
body: <p>I can create a button with rounded corners like this (from <a href="https://stackoverflow.com/questions/6745663/how-to-create-make-rounded-corner-buttons-in-wpf">How to create/make rounded corner buttons in WPF?</a>):</p>
  
  <pre><code>&lt;Button&gt;
      &lt;Button.Resources&gt;
          &lt;Style TargetType="Border"&gt;
              &lt;Setter Property="CornerRadius" Value="5"/&gt;
          &lt;/Style&gt;
      &lt;/Button.Resources&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>How can I define this inside a style and then apply this style for each button ? I tried creating a style like this, but the CornerRadius is not available :</p>
  
  <pre><code>&lt;Style x:Key = "myButtonStyle" TargetType = "Button"&gt;
    &lt;Setter Property = "Height" Value = "30"/&gt;
    &lt;Setter Property = "Width" Value = "80"/&gt;
    &lt;Setter Property = "Margin" Value = "10"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Like this Pavel ?</p>
  
  <pre><code>&lt;Style x:Key="s2" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}"&gt; 
    &lt;Setter Property="Background" Value = "Red" /&gt;
    &lt;Setter Property="CornerRadius" Value="5"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>WPF won't let me</p>