title: WPF Style to all control of one UserControl
body: <p>Is there a way to apply a style to all controls of the same type in <strong>one</strong> user control dynamically, without applying in all controls of my application and without go to the control and set the style manually?</p>
  
  <p><strong>EDIT</strong>
  The problem is that in my ResorceDictionary I have 2 styles, with the x:Key set</p>
  
  <pre><code>&lt;Style x:Key="ScrollBar_White" TargetType="{x:Type ScrollBar}"&gt;
  &lt;Style x:Key="ScrollBar_Black" TargetType="{x:Type ScrollBar}"&gt;
  </code></pre>
  
  <p>And I want to know if there is a way in XAML to apply dynamically a named style without use the following code on all the scrollbars of my UserControl.</p>
  
  <pre><code>&lt;ScrollBar Style="ScrollBar_White"&gt;
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm sorry, I'm new at WPF, so I'm missing to let you know somethings that are important (that I discover after applying your last solution).
  The last solution actually works if the styles are StaticResources, but they are DynamicResources and the BasedOn don't work well with DynamicResources. </p>
  
  <p>Any Idea how to do this with DynamicResource?</p>
  
  <p>Many thanks, and sorry I miss important points in my questions.</p>