I have a standard style for my buttons but I want certain parts of the style to be configurable. e.g. I have a border appear when MouseOver is triggered for the button and I
I think TemplateBinding is evaluated at compile time so you can't dynamically set a TemplateBinding in your Setter, try using Binding instead (see below).
<Setter TargetName="border" Property="BorderBrush"
Value="{Binding Path=(local:ThemeProperties.ButtonBorderColour),
RelativeSource={RelativeSource TemplatedParent}}"/>
Hope this helps.
Try this:
<Setter TargetName="border" Property="BorderBrush" Value="{TemplateBinding Path=(local:ThemeProperties.ButtonBorderColour)}" />
The difference being that parentheses around the property indicate that it is an attached property.