Skip to content

Commit a0ec0aa

Browse files
committed
Fixed FixedRowLength behavior
1 parent 8d64ee6 commit a0ec0aa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/WrapPanel2/samples/WrapPanel2BasicSample.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
1+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
22
<Page x:Class="WrapPanel2Experiment.Samples.WrapPanel2BasicSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -20,7 +20,7 @@
2020
</Style>
2121
</Page.Resources>
2222

23-
<Grid MaxHeight="600">
23+
<Grid MaxHeight="600" Margin="16">
2424
<Grid.RowDefinitions>
2525
<RowDefinition Height="auto" />
2626
<RowDefinition />

components/WrapPanel2/src/WrapPanel2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void ArrangeRow(ref UVCoord pos, RowSpec row, UVCoord uvFinalSize, Queue
133133
}
134134

135135
// Set a flag for if the row is being forced to stretch
136-
bool forceStretch = row.PortionsSum is 0 && StretchChildren is not StretchChildren.StarSizedOnly;
136+
bool forceStretch = FixedRowLengths && row.PortionsSum is 0 && StretchChildren is not StretchChildren.StarSizedOnly;
137137

138138
// Setup portionSize for forced stretching
139139
if (forceStretch)

0 commit comments

Comments
 (0)