microsoft / microsoft/microsoft-ui-xaml

Scrollview viewport update issue with nested itemsrepeater on horizontal scrolling

Open
#10,680 0 comments 0 reactions 0 assignees View on GitHub
area-ItemsRepeater area-Scrolling bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

ScrollView seams not to update the viewport correctly if you use nested ItemsRepeater.
Viewport is not update or wrongly update so that the content looks cutted. See video.
This only happens on horizontal scrolling and only if there are 2 nested ItemsRepeater / ItemsControl used.

https://github.com/user-attachments/assets/82da5e2e-a1da-4fc6-82de-c545f3654e69

https://github.com/user-attachments/assets/dc7291b2-fb57-4a8d-b357-19dbf1960a82

Notes:
I have also seen that the size measure of the children "VContainer" seams to be not correct, at least for the width.
The ScrollView should allow there child to expand to any size, but in fact it reduce the available width by the own width. I did a small workaround for this by override "MeasureOverride" and allow to expand in width too. The odd behavior above could be the result of this workaround.

In fact without this workaround the horizontal scroll bar is never visible, because the child width is limited by the scrollview. see next video.

https://github.com/user-attachments/assets/cb4ab6bd-f0ff-4a76-a582-f6c196964d24

### Steps to reproduce the bug

Attached is a Project that shows that behavior.
In General you need a ScrollView that has nested ItemsRepeater. One to display items vertical and one that display item horizontal. In Addition i have printed some Images for better visualization of the issue.
[NoHorizontalScrollBar.zip](https://github.com/user-attachments/files/21362245/NoHorizontalScrollBar.zip)

### Version
"Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4654"
"Microsoft.WindowsAppSDK" Version="1.7.250606001"
net8.0-windows10.0.19041.0

Contributor guide

Open the contributing guide

Research direction

Start by running the attached NoHorizontalScrollBar.zip project with the listed Windows App SDK and SDK BuildTools versions, then reproduce horizontal scrolling with nested ItemsRepeater controls. Compare behavior with and without the reported MeasureOverride workaround; done means the viewport updates correctly, child width is not incorrectly constrained, and the horizontal scrollbar appears when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.