Myra icon indicating copy to clipboard operation
Myra copied to clipboard

Layout not up-to-date when building uis via code

Open IceReaper opened this issue 3 years ago • 0 comments

Example: tabs.

  1. Create new tab control
  2. Create a tab item
  3. Add tab item 1 to the tab control
  4. Add tab item 1 content to tab item 1
  5. Add tab item 2 to the tab control
  6. 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.

IceReaper avatar Oct 17 '22 11:10 IceReaper