Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.

General question. I have a ControlTemplate that is reasonably complex, several TextBoxes, etc.
I can't use TemplateBinding to bring all the properties to the surface so that I can set all the styles.

Is there a way for a Style to 'delve' into the controls within a control to set values?

Hope my question is clear without an example.

Thanks
Posted
Updated 14-Mar-10 15:43pm
v3

No,

The question isn't clear :-D

You can set properties of controls from within the style. For example, for a textbox:

<Setter Property="Textbox.Text" Value="Tra la la"/>
 
Share this answer
 
v3
The datacontext needs to be carried down to the textboxes, etc. that are within the style. Hope that helps.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900