Skip to content

Commit e6f6daa

Browse files
Merge branch 'main' into fix-segmenteditem-background-issue
2 parents 511a222 + 9ce8a94 commit e6f6daa

3 files changed

Lines changed: 25 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
uses: darenm/setup-vstest@3a16d909a1f3bbc65b52f8270d475d905e7d3e44
151151

152152
- name: Install Testspace Module
153-
uses: testspace-com/setup-testspace@v1
153+
uses: testspace-com/setup-testspace@v1.0.8
154154
with:
155155
domain: ${{ github.repository_owner }}
156156

Lines changed: 17 additions & 18 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="PrimitivesExperiment.Samples.WrapLayoutSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -10,31 +10,30 @@
1010
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
1111
mc:Ignorable="d">
1212
<Page.Resources>
13-
<DataTemplate x:Key="WrapTemplate">
14-
<Border Width="{Binding Width}"
13+
<DataTemplate x:Key="WrapTemplate"
14+
x:DataType="local:ColorItem">
15+
<Border Width="{x:Bind Width}"
1516
Height="48"
1617
CornerRadius="{StaticResource ControlCornerRadius}">
1718
<Border.Background>
18-
<SolidColorBrush Color="{Binding Color}" />
19+
<SolidColorBrush Color="{x:Bind Color}" />
1920
</Border.Background>
2021
<TextBlock Margin="6,4,4,4"
2122
FontSize="16"
22-
Text="{Binding Index}" />
23+
Text="{x:Bind Index}" />
2324
</Border>
2425
</DataTemplate>
2526
</Page.Resources>
2627

27-
<Grid>
28-
<ScrollViewer x:Name="WrapScrollParent">
29-
<muxc:ItemsRepeater x:Name="WrapRepeater"
30-
ItemTemplate="{StaticResource WrapTemplate}"
31-
ItemsSource="{x:Bind ColorsCollection, Mode=OneWay}">
32-
<muxc:ItemsRepeater.Layout>
33-
<controls:WrapLayout x:Name="Wrap"
34-
HorizontalSpacing="{x:Bind HorizontalSpacing, Mode=OneWay}"
35-
VerticalSpacing="{x:Bind VerticalSpacing, Mode=OneWay}" />
36-
</muxc:ItemsRepeater.Layout>
37-
</muxc:ItemsRepeater>
38-
</ScrollViewer>
39-
</Grid>
28+
<ScrollViewer>
29+
<muxc:ItemsRepeater x:Name="WrapRepeater"
30+
ItemTemplate="{StaticResource WrapTemplate}"
31+
ItemsSource="{x:Bind ColorsCollection, Mode=OneWay}">
32+
<muxc:ItemsRepeater.Layout>
33+
<controls:WrapLayout x:Name="Wrap"
34+
HorizontalSpacing="{x:Bind HorizontalSpacing, Mode=OneWay}"
35+
VerticalSpacing="{x:Bind VerticalSpacing, Mode=OneWay}" />
36+
</muxc:ItemsRepeater.Layout>
37+
</muxc:ItemsRepeater>
38+
</ScrollViewer>
4039
</Page>

components/Primitives/samples/WrapLayoutSample.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ public WrapLayoutSample()
2323
random = new Random(DateTime.Now.Millisecond);
2424
for (int i = 0; i < random.Next(1000, 5000); i++)
2525
{
26-
var item = new ColorItem { Index = i, Width = random.Next(50, 250), Height = random.Next(50, 250), Color = Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255)) };
26+
var item = new ColorItem
27+
{
28+
Index = i,
29+
Width = random.Next(50, 250),
30+
Height = random.Next(50, 250),
31+
Color = Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255))
32+
};
2733
ColorsCollection.Add(item);
2834
}
2935
}

0 commit comments

Comments
 (0)