title: WPF StackPanel.Resources setter on more than one control type?
body: <p>I want to use a setter to set a default margin of all elements in my stackpanel, not just buttons but also textboxes and labels. </p>
  
  <pre><code>    &lt;StackPanel&gt;
          &lt;StackPanel.Resources&gt;
              &lt;Style TargetType="{x:Type Button}"&gt;
                  &lt;Setter Property="Margin" Value="0,10,0,0"/&gt;
              &lt;/Style&gt;
          &lt;/StackPanel.Resources&gt;
          ...
  </code></pre>
  
  <p>When I try to change above Button to <code>Control</code> or <code>FrameworkElement</code> (a derived type of each element) it doesn't work. </p>
  
  <p>How can I fix this without having to specify 2 different <code>Style</code> elements with the same content but different x:Types on the TargetType?</p>