SILVERLIGHT CUSTOM templated control GetTemplateChild()
I want to retireve control from ControlTemplate located in the resource dictionary. I have completed these steps :
- I have set the defaultstylekey property.
- I am trying to retrieve the control in an override method of OnApplyTemplate();
- I am still getting null results
How is it possible ? Ive read about 25 articles about this and it to be a commo开发者_开发知识库n problem and everybody just posted a message that they've finally done it but didn't post the solution to this problem . Thanks for your advice
RESOLVED
I forgot that the control must be added to parent control and loaded. I've also used UpdateLayout() method before manipulating with the controls from template.
精彩评论