开发者

SILVERLIGHT CUSTOM templated control GetTemplateChild()

I want to retireve control from ControlTemplate located in the resource dictionary. I have completed these steps :

  1. I have set the defaultstylekey property.
  2. I am trying to retrieve the control in an override method of OnApplyTemplate();
  3. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜