Repository navigation
Description
Bug Report
This bug is the root cause of another one: #410.
When the Grid panel is measuring its children, it will check if it can use only one dimension to layout its children. This is called the fastpath. When there's both more than one columns and more than one row, this fastpath mecanism can't be used.
Current behavior
The non-fastpath will simply invoke the horizontal measure followed by the vertical measure. During the horizontal measure, the vertical size is simply the size of the control and same behavior for vertical measurement. The problem is happening there: since the VirtualizingPanelLayout will use the available vertical measurement to generate its items, it can generate too much items because the size is larger than the real one. During the second measure (or during the arrange phase), the right vertical measurement will be passed, causing the virtualizing panel to remove items... because too much has been generated.
Expected behavior
The availableSize used to measure children of a Grid panel should always represent the actual available size.
Minimal reproduction of the problem with instructions
Expected behavior is coded in this test: 394be74#diff-649b70570e5cb6ca2be79932ec29ef8dR235
Simply remove the
[Ignore]attribute and run the test.
Environment
Nuget Package:
Package Version(s):
Affected platform(s):
- [~] iOS (this bug is present on iOS, but doesn't affect the virtualizing)
- [~] Android (this bug is present on Android, but doesn't affect the virtualizing)
- [X] WebAssembly
- [ ] Windows
- [ ] Build tasks
Activity
Changed the layout of Playground to ensure <Grid> is always using fas…
Changed the layout of Playground to ensure <Grid> is always using fas…