title: Create Style for a StackPanel and its Contents
body: <p>I want to create a style for Stackpanels using a key. This style will be in a global ResourceDictionary for use everywhere in the application. But it should not only set the style of the Stackpanel, but also its content.</p>
  
  <p>I want to use the stackpanel like this:</p>
  
  <pre><code>&lt;StackPanel Style="{StaticResource GlobalStackPanelStyle}"&gt;
  &lt;Button&gt;test&lt;/Button&gt; &lt;-- the button style should also be defined due to the Stackpanel style
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>How should the Resourcedictionary look like if for example all the containing buttons should be green?</p>