-
Notifications
You must be signed in to change notification settings - Fork 79
Marquee State Transition Updates #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 11 commits
0d8b18f
6052375
cc67ddd
d275944
4b2ef29
f847934
61ca149
ba43326
4244212
e34e9eb
5c61043
c81a9e9
d2a1ff1
cfe7db2
efe51f9
b530faf
c2047a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <!-- 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. --> | ||
| <Page x:Class="MarqueeExperiment.Samples.MarqueeBehaviorSample" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:controls="using:CommunityToolkit.WinUI.Controls" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:interactivity="using:Microsoft.Xaml.Interactivity" | ||
| xmlns:local="MarqueeExperiment.Samples" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <win:StackPanel Padding="16"> | ||
| <TextBlock FontWeight="Bold" | ||
| Text="This Marquee will loop once when hovered." /> | ||
| <controls:Marquee x:Name="Loop1Marquee" | ||
| Background="Transparent" | ||
| Behavior="Ticker" | ||
| Content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." | ||
| FontSize="18" | ||
| RepeatBehavior="1x" | ||
| Speed="256"> | ||
| <interactivity:Interaction.Behaviors> | ||
| <interactivity:EventTriggerBehavior EventName="PointerEntered" | ||
| SourceObject="{Binding ElementName=Loop1Marquee}"> | ||
| <interactivity:CallMethodAction MethodName="StartMarquee" | ||
| TargetObject="{Binding ElementName=Loop1Marquee}" /> | ||
| </interactivity:EventTriggerBehavior> | ||
| </interactivity:Interaction.Behaviors> | ||
| </controls:Marquee> | ||
|
|
||
| <TextBlock Margin="0,16,0,0" | ||
| FontWeight="Bold" | ||
| Text="This Marquee will loop while hovered and pause when not hovered." /> | ||
|
||
| <controls:Marquee x:Name="MarqueeControl" | ||
| Background="Transparent" | ||
| Behavior="Looping" | ||
| Content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." | ||
| FontSize="18" | ||
| RepeatBehavior="Forever" | ||
| Speed="96"> | ||
| <interactivity:Interaction.Behaviors> | ||
| <interactivity:EventTriggerBehavior EventName="PointerEntered" | ||
| SourceObject="{Binding ElementName=MarqueeControl}"> | ||
| <interactivity:CallMethodAction MethodName="StartMarquee" | ||
| TargetObject="{Binding ElementName=MarqueeControl}" /> | ||
| </interactivity:EventTriggerBehavior> | ||
| <interactivity:EventTriggerBehavior EventName="PointerExited" | ||
| SourceObject="{Binding ElementName=MarqueeControl}"> | ||
| <interactivity:CallMethodAction MethodName="PauseMarquee" | ||
| TargetObject="{Binding ElementName=MarqueeControl}" /> | ||
| </interactivity:EventTriggerBehavior> | ||
| </interactivity:Interaction.Behaviors> | ||
| </controls:Marquee> | ||
| </win:StackPanel> | ||
| </Page> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // 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. | ||
|
|
||
| namespace MarqueeExperiment.Samples; | ||
|
|
||
| [ToolkitSample(id: nameof(MarqueeBehaviorSample), "Marquee", description: "A control for scrolling content in a marquee fashion.")] | ||
| public sealed partial class MarqueeBehaviorSample : Page | ||
| { | ||
| public MarqueeBehaviorSample() | ||
| { | ||
| this.InitializeComponent(); | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.