Skip to content

ListBox is not implemented #1362

Description

@MelbourneDeveloper

Current behavior

When the ItemsSource on a ListBox is set, no items are populated. However, if the browser is maximised or otherwise resized, the items will populate.

Expected behavior

ListBox is populated as soon as ItemsSource is set.

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

Environment

Windows 10
Firefox (WASM)

Visual Studio

  • 2017 (version: 15.9.14)

Anything else we need to know?

This has happened in multiple different projects. It also happens in Edge.

Activity

  1. added
    kind/bug
    triage/untriaged
    on Aug 11, 2019
  2. added
    platform/wasm 🌐
    and removed
    triage/untriaged
    on Aug 13, 2019
  3. ghuntley commented on Aug 13, 2019

    @ghuntley
    Member

    Confirming that I've been able to reproduce this in master on the samples app. The problem manifests worst on Edge and happens less with Firefox. This is what I see.

    ezgif-4-1c3be2418788

    Is this similar to what you see?

  4. MelbourneDeveloper commented on Aug 13, 2019

    @MelbourneDeveloper
    Author

    @ghuntley it looks like it's in the ballpark. But in my case, I don't see anything in the listbox until I resize the browser. Very easy to see in the sample I posted.

  5. changed the title [-]ListBox Doesn't Update Layout On ItemSource Set[/-] [+]ListBox Doesn't Display Items[/+] on Aug 15, 2019
  6. MelbourneDeveloper commented on Aug 15, 2019

    @MelbourneDeveloper
    Author

    @ghuntley there is an update on this.

    I thought the issue might because I was setting the ItemsSource directly rather than using binding. So, I tried creating a ViewModel, and binding to the ItemsSource. I got the same result.

    I thought that perhaps the issue was because UpdateLayout was not being called. So, I manually called UpdateLayout after the items were set. Again, same result.

    I also tried manually adding an item in to the ObservableCollection to try to wake up: same result.

    I also tried in Chrome. Same result.

    The problem is very easy to reproduce if you grab my sample.

  7. MelbourneDeveloper commented on Aug 15, 2019

    @MelbourneDeveloper
    Author

    @ghuntley I switched my sample to a ComboBox so I could get it working. I've tagged the issue UnoIssue1362 so if you grab that commit, you will see the issue.

  8. carldebilly commented on Aug 29, 2019

    @carldebilly
    Member

    I tried the original report (with a ListView & tag UnoIssue1362) and I confirm I see the bug. I upgraded Uno.UI to latest stable version:

    <!-- RestClient.Net.Samples.Uno.Wasm.csproj -->
    <ItemGroup>
      <PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
      <PackageReference Include="Uno.UI" Version="1.45.0" />
      <PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.302" />
      <DotNetCliToolReference Include="Uno.Wasm.Bootstrap.Cli" Version="1.0.0-dev.302" />
    </ItemGroup>

    Reported problem solved.

    But I'm not sure the @ghuntley's problem with SampleApps is related...

  9. MelbourneDeveloper commented on Aug 29, 2019

    @MelbourneDeveloper
    Author

    @carldebilly , @ghuntley thanks for looking in to this. Unfortunately the problem is different with the latest version. The ListBox doesn't show up at all. I made the ListBox red to highlight the issue. You can see it in UWP, but not on Wasm (Firefox, Edge or Chrome).

    Wasm (Firefox,Edge,Chrome):
    image

    UWP:
    image

    Please see the branch here . This has your NuGet upgrades in it.

  10. carldebilly commented on Sep 3, 2019

    @carldebilly
    Member

    Ok I'll reopen this issue.

  11. 15 remaining items

  12. added
    help wanted
    on Mar 1, 2021
  13. changed the title [-]ListBox is not implemented[/-] [+]`ListBox` is not implemented[/+] on May 31, 2023
  14. added
    area/porting 🖨️
    on Jun 2, 2023
  15. added theissue type on Jul 17, 2025
  16. MartinZikmund commented on Apr 7, 2026

    @MartinZikmund
    Member

    Repro generator

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

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

    Both tests fail on Skia Desktop: listBoxItems.Count = 0 — no ListBoxItem containers are created in the ItemsPanelRoot even after the control is loaded and WaitForIdle completes. The bug is cross-platform, not WASM-only. ListBox does not materialize item containers when ItemsSource is assigned, regardless of timing.

  17. MartinZikmund commented on Nov 7, 2026

    @MartinZikmund
    Member

    Thanks for the report and the repro. Looking at current master, ListBox is still essentially a stub:

    The earlier repro-branch tests also show no ListBoxItem containers being created on Skia, so this is not WASM-only and not a resize/timing problem. The fix is a port of the WinUI ListBox implementation, so I am leaving this open as a porting task.

    This was checked as part of an AI-assisted backlog review by reading the code, not by running it. If it looks wrong, please reply and we will take another look.

  18. added 3 commits that reference this issue on Nov 12, 2026
    13dd4d5
    3f60a9b
    de5f2d7
  19. added a commit that references this issue on Nov 25, 2026
    f26c9e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/porting 🖨️difficulty/medium 🤔has-repro-branchhelp wantedkind/bugplatform/wasm 🌐project/items 🧾

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions