Skip to content

Commit e27c201

Browse files
committed
Adjusted MarqueeSample to work on WinUI 2
1 parent 23c14e8 commit e27c201

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

components/Marquee/samples/MarqueeSample.xaml

Lines changed: 11 additions & 9 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="MarqueeExperiment.Samples.MarqueeSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -17,21 +17,23 @@
1717
Speed="{x:Bind MQSpeed, Mode=OneWay}">
1818
<controls:Marquee.ContentTemplate>
1919
<DataTemplate x:DataType="local:MarqueeSampleItems">
20-
<ItemsRepeater ItemsSource="{x:Bind Items}">
21-
<ItemsRepeater.Layout>
22-
<StackLayout Orientation="Horizontal"
23-
Spacing="8" />
24-
</ItemsRepeater.Layout>
25-
<ItemsRepeater.ItemTemplate>
20+
<ItemsControl ItemsSource="{x:Bind Items}">
21+
<ItemsControl.ItemsPanel>
22+
<ItemsPanelTemplate>
23+
<StackPanel Orientation="Horizontal"
24+
Spacing="8" />
25+
</ItemsPanelTemplate>
26+
</ItemsControl.ItemsPanel>
27+
<ItemsControl.ItemTemplate>
2628
<DataTemplate x:DataType="local:MarqueeSampleItem">
2729
<Border Width="100"
2830
Height="48"
2931
Background="{x:Bind Brush}">
3032
<TextBlock Text="{x:Bind Name}" />
3133
</Border>
3234
</DataTemplate>
33-
</ItemsRepeater.ItemTemplate>
34-
</ItemsRepeater>
35+
</ItemsControl.ItemTemplate>
36+
</ItemsControl>
3537
</DataTemplate>
3638
</controls:Marquee.ContentTemplate>
3739
</controls:Marquee>

components/Marquee/samples/MarqueeSample.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace MarqueeExperiment.Samples;
1010
[ToolkitSample(id: nameof(MarqueeSample), "Marquee", description: "A control for scrolling content in a marquee fashion.")]
1111
[ToolkitSampleNumericOption("MQSpeed", initial: 96, min: 48, max: 196, step: 1, Title = "Speed")]
1212
[ToolkitSampleMultiChoiceOption("MQDirection", "Left", "Right", "Up", "Down", Title = "Marquee Direction")]
13-
[ToolkitSampleTextOption("MQText", "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")]
1413
//[ToolkitSampleMultiChoiceOption("MarqueeRepeat", "Repeat", "Forever", "1x", "2x")]
1514
#if !HAS_UNO
1615
[ToolkitSampleMultiChoiceOption("MQBehavior", "Ticker", "Looping", "Bouncing", Title = "Marquee Behavior")]

0 commit comments

Comments
 (0)