From 417ee660f4cef751044814ab78bc20eb0d3ad967 Mon Sep 17 00:00:00 2001 From: Avishai Dernis Date: Sat, 10 Jan 2026 01:15:15 +0200 Subject: [PATCH 1/4] Changed Binding to x:Bind in WrapLayoutSample DataTemplates --- .../Primitives/samples/WrapLayoutSample.xaml | 20 +++++++++---------- .../samples/WrapLayoutSample.xaml.cs | 8 +++++++- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/components/Primitives/samples/WrapLayoutSample.xaml b/components/Primitives/samples/WrapLayoutSample.xaml index 316232999..6ca087b90 100644 --- a/components/Primitives/samples/WrapLayoutSample.xaml +++ b/components/Primitives/samples/WrapLayoutSample.xaml @@ -10,31 +10,29 @@ xmlns:muxc="using:Microsoft.UI.Xaml.Controls" mc:Ignorable="d"> - - + - + + Text="{x:Bind Index}" /> - - - - + - - - + + diff --git a/components/Primitives/samples/WrapLayoutSample.xaml.cs b/components/Primitives/samples/WrapLayoutSample.xaml.cs index 6b8c4cd6a..15f8ab957 100644 --- a/components/Primitives/samples/WrapLayoutSample.xaml.cs +++ b/components/Primitives/samples/WrapLayoutSample.xaml.cs @@ -23,7 +23,13 @@ public WrapLayoutSample() random = new Random(DateTime.Now.Millisecond); for (int i = 0; i < random.Next(1000, 5000); i++) { - 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)) }; + 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)) + }; ColorsCollection.Add(item); } } From 551e4ed15bcc654dc67ddfbc8d8ec7696d4564cc Mon Sep 17 00:00:00 2001 From: Avishai Dernis Date: Sat, 10 Jan 2026 01:19:33 +0200 Subject: [PATCH 2/4] XAML Styles --- components/Primitives/samples/WrapLayoutSample.xaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/Primitives/samples/WrapLayoutSample.xaml b/components/Primitives/samples/WrapLayoutSample.xaml index 6ca087b90..d89a2682f 100644 --- a/components/Primitives/samples/WrapLayoutSample.xaml +++ b/components/Primitives/samples/WrapLayoutSample.xaml @@ -1,4 +1,4 @@ - + - + @@ -26,12 +27,12 @@ + ItemTemplate="{StaticResource WrapTemplate}" + ItemsSource="{x:Bind ColorsCollection, Mode=OneWay}"> + HorizontalSpacing="{x:Bind HorizontalSpacing, Mode=OneWay}" + VerticalSpacing="{x:Bind VerticalSpacing, Mode=OneWay}" /> From dbc60f2378d55123dd4ae9663077517565b76e3a Mon Sep 17 00:00:00 2001 From: Avishai Dernis Date: Tue, 2 Jun 2026 11:13:23 +0300 Subject: [PATCH 3/4] Added scroll viewer to WrapLayout sample --- .../Primitives/samples/WrapLayoutSample.xaml | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/components/Primitives/samples/WrapLayoutSample.xaml b/components/Primitives/samples/WrapLayoutSample.xaml index d89a2682f..a9170b2de 100644 --- a/components/Primitives/samples/WrapLayoutSample.xaml +++ b/components/Primitives/samples/WrapLayoutSample.xaml @@ -1,39 +1,43 @@ - - + + - - + + - + - - + + - + - + From f76dde2d643348468314272e757591f5be14832d Mon Sep 17 00:00:00 2001 From: Avishai Dernis Date: Tue, 2 Jun 2026 11:18:45 +0300 Subject: [PATCH 4/4] Apply XAML Styles --- .../Primitives/samples/WrapLayoutSample.xaml | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/components/Primitives/samples/WrapLayoutSample.xaml b/components/Primitives/samples/WrapLayoutSample.xaml index a9170b2de..e7c4e3a06 100644 --- a/components/Primitives/samples/WrapLayoutSample.xaml +++ b/components/Primitives/samples/WrapLayoutSample.xaml @@ -1,42 +1,38 @@ - - + + - - + + - + - + - +