title: WPF: how to style a class like in css?
body: <p>Let's say I have a UserControl with 4 Borders:</p>
  
  <pre><code>&lt;Border /&gt;
  &lt;Border /&gt;
  &lt;Border /&gt;
  &lt;Border /&gt;
  </code></pre>
  
  <p>Now in my Resources I can go:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type Border}"&gt;
    ... change some properties here
  &lt;/Style&gt;
  </code></pre>
  
  <p>Now this is all good, but it will target all borders in my UserControl.
  But what if I just want to target a subset of them?</p>
  
  <p>I'd like to go:</p>
  
  <pre><code>&lt;Border Class="Type1" /&gt;
  &lt;Border Class="Type1" /&gt;
  &lt;Border /&gt;
  &lt;Border /&gt;
  </code></pre>
  
  <p>And then go:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type Border}" TargetClass="Type1"&gt;
    ... change some properties here
  &lt;/Style&gt;
  </code></pre>
  
  <p>But this obviously doesn't exist, is there some other way I can achieve what I'm after?
  Thanks</p>