Grid only renders and lays out first child
See original GitHub issueDescription
I have a Grid layout set as a Content to a ScrollView. Inside the Grid I have two children - the first one is not visible (IsVisible is set to false) and the second one is visible:
<ScrollView>
<Grid>
<!-- If we switch the places of the two Labels the Text of the visible one will be visualized -->
<Label Text="I am not visible" IsVisible="False"/>
<Label Text="I am visible"/>
</Grid>
</ScrollView>
When I run my application nothing is visialized. If I switch the places of the Children the visible child is visualized as expected.
Steps to Reproduce
- Run the attached project.
- Navigate to the second page.
- Notice that nothing is visualized.
Version with bug
Preview 13
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 8 (at least) and up
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Exempt a child element from auto layout in CSS grid ...
Basically I want it to not participate in the grid layout at all - not take up a "slot" in the auto layout,...
Read more >Basic concepts of grid layout - CSS: Cascading Style Sheets
CSS grid layout introduces a two-dimensional grid system to CSS. Grids can be used to lay out major page areas or small user...
Read more >Grid layout using line-based placement - CSS - MDN Web Docs
Inside our grid container, we have four child elements. If we do not place these on to the grid in any way they...
Read more >Make grid container fill columns not rows
In this case, we want 2 items to be in the first column. target the remaining items (from the third onwards) with ~...
Read more >CSS Grid Gotchas And Stumbling Blocks
The first layout uses flexbox to display as many boxes as will fit into the available width. Here we are controlling the layout...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@hartez @PureWeen I thought someone opened this issue before - and I feel like that is why I know about it. But, I can’t seem to find it.
I am soooo sure I reviewed a PR on this exact issue that I am now doubting my memory.
If anyone knows of the issue, feel free to link to it.
Right now I am going to assume I can’t find the issue because it does not exist and will update the title to be more accurate.
@mattleibow Perhaps the bug is somehow related to how the Grid is measured by its parent. I assume the ScrollView measures the Grid with double.PositiveInfinity, while the ContentPage - with some fixed value. This is just a wild guess though.