Myra
Myra copied to clipboard
Layout not up-to-date when building uis via code
Example: tabs.
- Create new tab control
- Create a tab item
- Add tab item 1 to the tab control
- Add tab item 1 content to tab item 1
- Add tab item 2 to the tab control
- Add tab item 2 content to tab item 2
What you see now is a messed up layout in tab1 (currently active) When you switch to tab2, and back to tab1, the layout is correct.
When using the MML approach, the content is build fully first, then added to the tab control, which causes a layouting at that point.
Workaround: First build up all content stuff, and afterwards assign the tabItem to the tabControl.