title: Can my WPF Style Setter use a TemplateBinding?
body: <p>I'm trying to do something like this...</p>
  <pre><code>&lt;Style
      x:Key=&quot;MyBorderStyle&quot;
      TargetType=&quot;Border&quot;&gt;
      &lt;Setter
          Property=&quot;Padding&quot;
          Value=&quot;{TemplateBinding Padding}&quot; /&gt;
  &lt;/Style&gt;
  </code></pre>
  <p>...but I get the error:</p>
  <blockquote>
  <p><em>'Padding' member is not valid because it does not have a qualifying type name.</em></p>
  </blockquote>
  <p>How do I provide a &quot;qualifying type name&quot;?</p>
  <p>Note: The reason I'm trying to do this, is that I'd like to include the same Border in a series of similar ControlTemplates.</p>
  <p>I also tried this:</p>
  <pre><code>&lt;Setter
      Property=&quot;Padding&quot;
      Value=&quot;{TemplateBinding GridViewColumnHeader.Padding}&quot; /&gt;
  </code></pre>
  <p>...and it actually compiled, but then when I ran the app, I got a <code>XamlParseException</code>:</p>
  <blockquote>
  <p><em>Cannot convert the value in attribute 'Value' to object of type ''.</em></p>
  </blockquote>
  <p>I thought maybe qualifying <code>Padding</code> with <code>GridViewColumnHeader</code> (which is the ControlTemplate I want to use this style with) would work, but no dice.</p>
  <p><strong>EDIT:</strong></p>
  <p>Well, according to the documentation for <code>TemplateBinding</code>, it says:</p>
  <blockquote>
  <p>Links the value of a property in a control template to be the value of some other exposed property on the templated control.</p>
  </blockquote>
  <p>So it sounds like what I'm trying to do is just plain impossible. I really would like to be able create reusable styles for certain controls in my control templates, but I guess the template bindings cannot be included in these styles.</p>