I’m making a leaderboard and I need to dynamically fill it with lines with players. To do this, I put one StackPanel in the ScrollViewer. Then I put 3 more StackPanels in it, which are responsible for groups of players. The problem is that when working in the GUI Editor, the stack panel increases and displays all the elements in itself ONLY if I set “adaptWidthToChildren true”. Otherwise, when adding new rows, they are not displayed and the stack panel does not automatically expand under them.
However, I have read that this is wrong. In addition, when I myself started displaying the screen in the project, I saw that, unlike the editor, in the project it adapts only to the tallest child, and not to the sum of the heights of all children.
How to solve the problem? How to make the stack panel expand automatically when filling and display all the elements in it vertically?