microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.2k stars 669 forks source link

Expander Content With ItemsRepeater Rendering Bug #9337

Open wky214269273 opened 5 months ago

wky214269273 commented 5 months ago

Describe the bug

I use the Expander control and encapsulate an itemsRepeater in Content to display a large amount of data (about a few hundred items). When I first expand the Expander control, the content can be displayed correctly, but when I fold it up and expand it again, it becomes a blank space that requires a mouse click or scroll to display. I guess it may be a virtualization issue that caused the rendering to fail. Is there a solution to this problem?

Steps to reproduce the bug

1、Create an Expander Control,And the content contains an ItemsRepeater 2、Fill a large amount datas in this ItemsRepeater 3、Expand the Control -> Collapsed Control -> Expand the Control

Expected behavior

ItemsRepeater can show data correctly

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.4.5: 1.4.240411001

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

lhecker commented 2 months ago

I just hit this bug while working on Windows Terminal. That was not the most pleasant surprise for sure! As a workaround I'm using a ListView inside my ScrollView now, which obviously is not a great alternative, but it does work (until this issue is fixed).