-
Notifications
You must be signed in to change notification settings - Fork 118
Description
As I was writing up the spec for the WinUI transfer and looking at primitive examples and was a bit baffled at what was happening with StretchChild and my intuitive expectations...
Take this code:
<controls:WrapPanel Width="132" StretchChild="Last">
<Rectangle Fill="Red" Width="45" Height="44"/>
<Rectangle Fill="Blue" Width="44" Height="44"/>
<Rectangle Fill="Green" Width="44" Height="44"/>
<Rectangle Fill="Orange" Height="44"/>
</controls:WrapPanel>This properly stretches the last item across the bottom:
However, if we make enough room for the green box on the first row (by making the red 44 width [only change])...
<controls:WrapPanel Width="132" StretchChild="Last">
<Rectangle Fill="Red" Width="44" Height="44"/>
<Rectangle Fill="Blue" Width="44" Height="44"/>
<Rectangle Fill="Green" Width="44" Height="44"/>
<Rectangle Fill="Orange" Height="44"/>
</controls:WrapPanel>Actual: Then the Orange rect disappears entirely!
Expected: I would expect it to span the entire bottom row, like so:
This is the behavior we should at least make sure works, and have a test for. FYI @azchohfi as we'll need to port whatever fixes we make here to WinUI as well. I'm going to spec it up as I expect it to work for now.
Originally posted by @michael-hawker in #704 (comment)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status