-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
My issue is when a ScrollView contains a VerticalStackLayout with a BindableLayout.ItemsSource, removing items from the bound ObservableCollection does not trigger the ScrollView to re-measure its content. The layout retains the height it calculated for the previous collection size, leaving blank space below the remaining items.
I have tried quite a few things, and have come from the MAUIVerse after seeking help there.
When This Occurs
- Trigger: Remove items from an
ObservableCollectionbound toBindableLayout.ItemsSource - Symptom:
ScrollViewheight does not shrink; extra whitespace appears below remaining content - Scope: Affects nested
BindableLayoutstructures (e.g., aVerticalStackLayoutinScrollViewcontainingBindableLayout.ItemsSource, which itself contains anotherVerticalStackLayoutwithBindableLayout.ItemsSource) - Platforms: Confirmed on iOS Release (works on Andriod debug)
UI_Issue.mp4
Steps to Reproduce
Steps to Reproduce
- Run the app and navigate to the debug page
- Click Load Day 1 — each meal section displays 5 food items
- Click Load Day 2 — each meal section now has 0–1 items
- Observe: The
ScrollViewdoes not shrink to fit the smaller content; blank space remains below the items where they used to be
Expected Behavior
After clicking Load Day 2, the ScrollView should re-measure its content and resize to fit the new (smaller) height. No blank space should appear.
Actual Behavior
The ScrollView retains the height calculated for Day 1 (5 items per section). When Day 2 loads with 0–1 items, the content shrinks but the ScrollView container does not. Users see large blank areas of whitespace.
Link to public reproduction project repository
https://github.com/LewieDun/ScrollViewBug
Version with bug
10.0.20
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
iOS
Affected platform versions
IOS 18, 26
Did you find any workaround?
N/A