UI Stack panels in Visual Tree not updating order
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release/GitHub (please choose appropriate option)
Official Release
Version: Version number and/or git branch
Stride Game Studio 4.2.0.2149
.NET 8.0.2
Platform(s): Does the problem occur on Windows, Android...?
Windows 10
Describe the bug
In the UI Editor using a UILibrary the StackPanel's visual tree order does not control the order the UI elements are displayed in the UI visual editor.
To Reproduce
Steps to reproduce the behavior:
- Create a new
StackPanelin aUILibrary, no setting changes required - Drag two
TextBlocks onto theStackPanelin the Visual Tree - Change the text of the
TextBlocks to distinct values, like "1" and "2" - In the Visual Tree drag the first
TextBlockabove the secondTextBlock
At this point the first TextBlock in the Visual Tree will be the second value in the preview window.
The work around for this is to use the Visual Tree to select and drag all elements out of the StackPanel and then drag and drop all elements back into the StackPanel
Expected behavior
The UI elements in the Visual Tree get drawn to visual UI editor in the same order that a StackPanel would display it's children elements
Screenshots
Here is the end result of the Reproduced steps
Log and callstacks
N/A
Additional context
This was done an an existing project, have not tried it on a new project. I have tested in a new UILibrary.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the Stride Game Studio UI Editor using a UILibrary, a StackPanel, and two distinct TextBlocks, then inspect how Visual Tree reordering affects the preview. Done means the elements render in the preview in the same order shown by the Visual Tree after reordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100