Skip to content

ItemsStackPanel does not stretch its children properly #2136

Open

Description

@dr1rrb

Current behavior

In WCT on WASM, the navigation items are top aligned:
image

Expected behavior

They are centered as UWP, iOS and Android:

image

How to reproduce it (as minimally and precisely as possible)

Undo the commit unoplatform/Uno.WindowsCommunityToolkit@84db026

Environment

Nuget Package: Uno.UI
Package Version(s): 2.0
Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio: irrelevant
Relevant plugins: none

Workaround

If your list is small, you can replace the ItemsStackPanel by a StackPanel (which disable the UI virtualization).

Activity

  1. added
    kind/bug
    triage/untriaged
    platform/wasm 🌐
    on Nov 21, 2019
  2. added this to the 3.1 milestone on Aug 29, 2020
  3. removed
    triage/untriaged
    on Aug 29, 2020
  4. modified the milestones: 3.1, HighPriority on Aug 31, 2020
  5. modified the milestones: HighPriority, 3.1 on Sep 1, 2020
  6. added
    project/items 🧾
    on Sep 21, 2020
  7. removed this from the 3.1 milestone on Sep 23, 2020
  8. added
    difficulty/tbd
    on Feb 15, 2021
  9. removed
    difficulty/tbd
    on Jun 1, 2021
  10. 4 remaining items

  11. Youssef1313 commented on Oct 6, 2024

    @Youssef1313
    Member

    This could be already fixed as layouting on Wasm has changed a lot with time (the issue is dating 5 years back)

  12. added
    triage/potentially-fixed
    on Oct 7, 2024
  13. morning4coffe-dev commented on Oct 13, 2024

    @morning4coffe-dev
    Member

    @MartinZikmund, @Youssef1313 I wasn't able to test this out yet as MUX seems to require me to signin, but I don't have a valid account to do so:
    image

  14. MartinZikmund commented on Apr 7, 2026

    @MartinZikmund
    Member

    Repro generator

    Runtime test(s) added in branch dev/mazi/repro/2136:

    • src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_ListViewBase.cs → When_ListView_ItemsStackPanel_Children_Are_Stretched_To_Full_Width

    ⚠️ The test(s) pass on current master (Skia Desktop) — ListViewItem containers are correctly stretched to the full ItemsStackPanel width (300px). This is tagged as triage/potentially-fixed, suggesting it may have been fixed since the original WASM-specific report. The branch serves as a regression guard.

  15. MartinZikmund commented on Apr 8, 2026

    @MartinZikmund
    Member

    Repro generator

    A PR has been created to add the passing regression test(s) from branch dev/mazi/repro/2136:

    The test(s) pass on current master (Skia target), suggesting the reported issue may be fixed. The issue was reported on WebAssembly — verification on that target is still recommended.

  16. added
    native-only
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

difficulty/medium 🤔has-repro-branchkind/bugnative-onlyplatform/wasm 🌐project/items 🧾project/layout 🧱triage/potentially-fixed

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions