views:

120

answers:

0

I have a style that overrides the ControlTemplate of the element (in this case, Label). So, I can use TemplateBinding to give the consumer control of certain things within the ControlTemplate. For example, I can set FontSize and Background explicitly in the Control and have access to these values within the ControlTemplate. However, this requires that the attribute is a valid attribute of the element I'm using. So, if within the control template I have a TranslateTransform, and I want to be able to use TemplateBinding to allow the consumer to set TranslateTransform.X and .Y explicitly in the element, I can't. Is there a way to either a) make this inheritable so that there is a base style with all of the verbose layout stuff in the ControlTemplate and derived styles that override only certain properties of certain elements, or b) give, as an example, a Label the ability to set UIElement.RenderTransform.TranslateTransform.X as an attribute?