My custom control is running int o a very annoying issue:
in my test I'm trying to check some dependency property, that also changes text in an inner child control.
But the OnApplyTemplate is not called until the test page has finished, loading, which only happens after the test is complete. so that means my child controls are null.
osherove
0 Points
6 Posts
SL Test framework: OnApplyTemplate only called after the test page was loaded
Jun 06, 2009 10:56 AM | LINK
My custom control is running int o a very annoying issue:
in my test I'm trying to check some dependency property, that also changes text in an inner child control.
But the OnApplyTemplate is not called until the test page has finished, loading, which only happens after the test is complete. so that means my child controls are null.
is there a workaround? am i missing something?
testing
jay nanavati
Contributor
3517 Points
668 Posts
Re: SL Test framework: OnApplyTemplate only called after the test page was loaded
Jun 06, 2009 06:53 PM | LINK
In your custom control constructor, call to OnApplyTemplate method.
and then in
public override void OnApplyTemplate()
{
//Here call to base version of OnApplyTemplate.
//then use GetTemplateChild method