Odd Each behavior in StackPanel

If you are using a StackPanel and you have an Each loop below other elements, the resulting elements of the loop will be unexpectedly pushed to the top of the StackPanel.

In the following example…

        <Text Value="Filter by Category:" />

    <Each Items="{categories}">
        <Text Value="{title}" />

… the categories will be listed and then it will say “Filter by Category:” below them.

You can deal with this bug by putting an additional StackPanel around the Each, but obviously that’s not an ideal long-term solution.

I am on Fuse v0.9.8 (build 5700).

Hi Ari,

This is unfortunately just how Each works currently, not a bug per se. Each is a Behavior and not a Node, hence it ends up in a different list and it doesn’t remember its place.

We are looking into ways of fixing this as I agree it is not ideal. Wrapping it in another panel is the only way to get around it for now.

Ah, interesting. Thanks for the info. I’m sure you guys’ll think of something. :slight_smile: