TemplateBinding can be a little too lightweight

TemplateBinding can be used within a ControlTemplate to reference a value from the control that the template has been implemented on, but it has a few issues associated with it.

On the plus side

TemplateBinding is evaluated at compile time giving an increase in performance.

On the negative side

TemplateBinding is a little lightweight on features and in what it can bind to or more specifically how it’s binds. It doesn’t offer all the capabilities of the Binding, for example you cannot apply converters, it doesn’t support two-way binding and most importantly it doesn’t handle the type converting that Binding implements.

So for example

<TextBlock Text="{TemplateBinding MyInteger}" />

where (you guessed it) MyInteger is an int, nothing will be output in this TextBlock. As it cannot convert an int to a string.

Luckily there’s another way of binding to the template using the slightly more verbose TemplatedParent option

<TextBlock Text="{Binding MyInteger, RelativeSource={RelativeSource TemplatedParent}}" />

Unlike the TemplateBinding this is evaluated at runtime and by using the Binding class we can all the goodness associated with Binding.