diff --git a/components/Marquee/samples/Dependencies.props b/components/Marquee/samples/Dependencies.props index e622e1df4..b0471fc89 100644 --- a/components/Marquee/samples/Dependencies.props +++ b/components/Marquee/samples/Dependencies.props @@ -11,21 +11,21 @@ - + - + - + - + diff --git a/components/Marquee/samples/Marquee.md b/components/Marquee/samples/Marquee.md index 69f8e9a96..f5a7b8dd5 100644 --- a/components/Marquee/samples/Marquee.md +++ b/components/Marquee/samples/Marquee.md @@ -15,6 +15,8 @@ icon: Assets/Marquee.png The Marquee control allows text or other content to scroll in a marquee fashion. The control is heavily templated and many changes can be made by modifying the style. The control can also be adjusted using the Speed, Behavior, RepeatBehavior, and Direction properties. +> [!Sample MarqueeTextSample] + ## Speed The speed property determines how quickly the content moves in pixels per second. The speed can be adjusted mid-animation and handled continously. @@ -23,6 +25,8 @@ The speed property determines how quickly the content moves in pixels per second The Marquee control has 3 behaviors +Default: `Ticker` + ### Ticker Ticker mode starts with all content off the screen then scrolls the content across across the screen. When the animation finishes in the mode no content will be on screen. @@ -39,14 +43,34 @@ Looping mode will begin with the start of the content fully in frame then scroll The repeat behavior determines how many times the marquee will loop before the animation finishes. It can be a number of iteration, a duration, or forever. +Default: `1x` + ## Direction The default direction is left, meaning the content will move leftwards, but this can be changed to right, up, or down. Direction changed between left and right or up and down are handled continously, meaning that the animation will resume from its current position if changed between these directions. -> [!Sample MarqueeTextSample] +Default: `Left` + +## Speed + +The speed property determines how quickly the content moves in pixels-per-second. The speed can be adjusted mid-animation and handled continously. Because the speed is in pixels per second the actual time it takes to scroll will depend on the size of the content. The content can also change size dynamically and the speed will remain constant. + +Default: `32` + +## AutoPlay + +The AutoPlay property determines if the marquee will start animating when it is loaded, upon on size changes, or when the content changes. If set to false the marquee can be started manually by calling the `StartMarquee` method. + +Default: `false` ## Non-Text Content It is possible to use non-text content in the Marquee control. However templating must be used because the control will need to be duplicated for the looping animation. > [!Sample MarqueeSample] + +# Level Up with Behaviors + +Use behaviors to triggers the Marquee on events + +> [!Sample MarqueeBehaviorSample] diff --git a/components/Marquee/samples/MarqueeBehaviorSample.xaml b/components/Marquee/samples/MarqueeBehaviorSample.xaml new file mode 100644 index 000000000..1b8772d64 --- /dev/null +++ b/components/Marquee/samples/MarqueeBehaviorSample.xaml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + consectetur adipiscing elit + + Ut enim ad minim veniam + + + + + + + + + + + + + + + + + diff --git a/components/Marquee/samples/MarqueeBehaviorSample.xaml.cs b/components/Marquee/samples/MarqueeBehaviorSample.xaml.cs new file mode 100644 index 000000000..e4bc7a8bf --- /dev/null +++ b/components/Marquee/samples/MarqueeBehaviorSample.xaml.cs @@ -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(); + } +} diff --git a/components/Marquee/samples/MarqueeSample.xaml b/components/Marquee/samples/MarqueeSample.xaml index 5a37d7777..ad9325679 100644 --- a/components/Marquee/samples/MarqueeSample.xaml +++ b/components/Marquee/samples/MarqueeSample.xaml @@ -1,4 +1,4 @@ - + - - - - MarqueeTextSample.xaml - - - - - MarqueeSample.xaml - - diff --git a/components/Marquee/samples/MarqueeTextSample.xaml b/components/Marquee/samples/MarqueeTextSample.xaml index 3912726e9..7d5d25bd6 100644 --- a/components/Marquee/samples/MarqueeTextSample.xaml +++ b/components/Marquee/samples/MarqueeTextSample.xaml @@ -1,4 +1,4 @@ - + - - + + +