UIElements added after start up.

Apr 27, 2012 at 9:20 AM

My application has many tabs, when it starts up it only loads the first tabs view. As new tabs are selected it loads subsequent views. window.Get<> returns only the controls in the first tab. Its as if it has cached all the controls during intial load and only looks into those. Is that the case ? . I tried Application.GetWindow again it doesnt seem to work.



Apr 27, 2012 at 9:55 AM


I know this problem to I solve this using the following flow



public TabPage GetCorrectTabPage(Tab tab, string name)
  TabPage page = null;
  foreach (ITabPage tabPage in tab.Pages)
    if(tabPage.Name == name)
page = tabPage as TabPage;
tabPage.Select(); } if(page != null) { page.Select(); } return page;


after that I found the correct elements on the page.