Skip to content

Commit 23c14e8

Browse files
committed
Apply XamlStyles for Marquee
1 parent 69cd648 commit 23c14e8

File tree

5 files changed

+30
-26
lines changed

5 files changed

+30
-26
lines changed

components/Marquee/samples/Marquee.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ keywords: Marquee, Control
66
dev_langs:
77
- csharp
88
category: Controls
9-
subcategory: StatusAndInfo
9+
subcategory: Layout
1010
experimental: true
1111
discussion-id: 231
12-
issue-id: 0
12+
issue-id: 426
1313
icon: Assets/Marquee.png
1414
---
1515

Lines changed: 11 additions & 7 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"
@@ -10,20 +10,23 @@
1010

1111
<StackPanel Padding="16">
1212
<controls:Marquee Behavior="{x:Bind ConvertStringToMarqueeBehavior(MQBehavior), Mode=OneWay}"
13+
Content="{x:Bind Data}"
1314
Direction="{x:Bind ConvertStringToMarqueeDirection(MQDirection), Mode=OneWay}"
1415
FontSize="18"
1516
RepeatBehavior="Forever"
16-
Speed="{x:Bind MQSpeed, Mode=OneWay}"
17-
Content="{x:Bind Data}">
17+
Speed="{x:Bind MQSpeed, Mode=OneWay}">
1818
<controls:Marquee.ContentTemplate>
1919
<DataTemplate x:DataType="local:MarqueeSampleItems">
2020
<ItemsRepeater ItemsSource="{x:Bind Items}">
2121
<ItemsRepeater.Layout>
22-
<StackLayout Orientation="Horizontal" Spacing="8"/>
22+
<StackLayout Orientation="Horizontal"
23+
Spacing="8" />
2324
</ItemsRepeater.Layout>
2425
<ItemsRepeater.ItemTemplate>
2526
<DataTemplate x:DataType="local:MarqueeSampleItem">
26-
<Border Width="100" Height="48" Background="{x:Bind Brush}">
27+
<Border Width="100"
28+
Height="48"
29+
Background="{x:Bind Brush}">
2730
<TextBlock Text="{x:Bind Name}" />
2831
</Border>
2932
</DataTemplate>
@@ -32,7 +35,8 @@
3235
</DataTemplate>
3336
</controls:Marquee.ContentTemplate>
3437
</controls:Marquee>
35-
36-
<Button Content="Add something" Click="AddItem_Click"/>
38+
39+
<Button Click="AddItem_Click"
40+
Content="Add something" />
3741
</StackPanel>
3842
</Page>

components/Marquee/samples/MarqueeTextSample.xaml

Lines changed: 3 additions & 3 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.MarqueeTextSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -10,10 +10,10 @@
1010

1111
<StackPanel Padding="16">
1212
<controls:Marquee Behavior="{x:Bind ConvertStringToMarqueeBehavior(MQBehavior), Mode=OneWay}"
13+
Content="{x:Bind MQText, Mode=OneWay}"
1314
Direction="{x:Bind ConvertStringToMarqueeDirection(MQDirection), Mode=OneWay}"
1415
FontSize="18"
1516
RepeatBehavior="Forever"
16-
Speed="{x:Bind MQSpeed, Mode=OneWay}"
17-
Content="{x:Bind MQText, Mode=OneWay}"/>
17+
Speed="{x:Bind MQSpeed, Mode=OneWay}" />
1818
</StackPanel>
1919
</Page>

components/Marquee/src/Marquee.xaml

Lines changed: 9 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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
@@ -75,27 +75,27 @@
7575
<TranslateTransform x:Name="MarqueeTransform" />
7676
</StackPanel.RenderTransform>
7777
<ContentPresenter x:Name="Segment1"
78+
win:FontStretch="{TemplateBinding FontStretch}"
79+
CharacterSpacing="{TemplateBinding CharacterSpacing}"
7880
Content="{TemplateBinding Content}"
7981
ContentTemplate="{TemplateBinding ContentTemplate}"
8082
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
81-
Foreground="{TemplateBinding Foreground}"
82-
win:FontStretch="{TemplateBinding FontStretch}"
83-
CharacterSpacing="{TemplateBinding CharacterSpacing}"
8483
FontFamily="{TemplateBinding FontFamily}"
8584
FontSize="{TemplateBinding FontSize}"
8685
FontStyle="{TemplateBinding FontStyle}"
87-
FontWeight="{TemplateBinding FontWeight}" />
86+
FontWeight="{TemplateBinding FontWeight}"
87+
Foreground="{TemplateBinding Foreground}" />
8888
<ContentPresenter x:Name="Segment2"
89+
win:FontStretch="{TemplateBinding FontStretch}"
90+
CharacterSpacing="{TemplateBinding CharacterSpacing}"
8991
Content="{TemplateBinding Content}"
9092
ContentTemplate="{TemplateBinding ContentTemplate}"
9193
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
92-
Foreground="{TemplateBinding Foreground}"
93-
win:FontStretch="{TemplateBinding FontStretch}"
94-
CharacterSpacing="{TemplateBinding CharacterSpacing}"
9594
FontFamily="{TemplateBinding FontFamily}"
9695
FontSize="{TemplateBinding FontSize}"
9796
FontStyle="{TemplateBinding FontStyle}"
98-
FontWeight="{TemplateBinding FontWeight}" />
97+
FontWeight="{TemplateBinding FontWeight}"
98+
Foreground="{TemplateBinding Foreground}" />
9999
</StackPanel>
100100
</Grid>
101101
</Grid>
Lines changed: 5 additions & 5 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="MarqueeTests.ExampleMarqueeTestPage"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -10,9 +10,9 @@
1010

1111
<Grid>
1212
<controls:Marquee x:Name="MarqueeControl"
13-
Behavior="Ticker"
14-
Direction="Left"
15-
Speed="96"
16-
Content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ac auctor augue mauris augue neque gravida in. Bibendum at varius vel pharetra vel turpis nunc eget lorem. Viverra adipiscing at in tellus integer feugiat scelerisque varius. Viverra ipsum nunc aliquet bibendum. Quis viverra nibh cras pulvinar mattis nunc. Netus et malesuada fames ac turpis egestas maecenas pharetra. Pellentesque habitant morbi tristique senectus. Gravida rutrum quisque non tellus orci. Diam phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet. Mollis aliquam ut porttitor leo." />
13+
Behavior="Ticker"
14+
Content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ac auctor augue mauris augue neque gravida in. Bibendum at varius vel pharetra vel turpis nunc eget lorem. Viverra adipiscing at in tellus integer feugiat scelerisque varius. Viverra ipsum nunc aliquet bibendum. Quis viverra nibh cras pulvinar mattis nunc. Netus et malesuada fames ac turpis egestas maecenas pharetra. Pellentesque habitant morbi tristique senectus. Gravida rutrum quisque non tellus orci. Diam phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet. Mollis aliquam ut porttitor leo."
15+
Direction="Left"
16+
Speed="96" />
1717
</Grid>
1818
</Page>

0 commit comments

Comments
 (0)