Here is my scenario.
1. I have usercontrol, uc1.
2. In uc1 i have listbox on which ItemTemplateSelector is defined and it is pointing to different DataTemplates having other usercontrols eg. uc2, uc3 etc...
3. Items in listbox are getting updated when UI is visible. I mean, I can see for eg. in a list box item first arrow comes up, then header then content and so on. Ideally i would expect the binding should already be happened by the time window
is displayed and items are ready to display instead of popping up one by one after UI is visible.
4. When i move the XAML content of eg. uc2 to uc1 as datatemplate i can see the expected behavior i.e. listbox item is ready by the time window is displayed.
I am suspecting the binding is delayed here but not sure why. I made different changes like setting the itemsSouce of listbox in datacontext change of uc1 but none helped and if i move the xaml content of uc2, uc3 etc to uc1 it clutters the logic of uc1.
Any ideas are appreciated. The reason i am concerned about the binding evaluation after the UI visible, because it effects the performance, though very little in my scenario (around 200 to 300 ms).
View Complete Post