|
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. --> |
2 | 2 | <Page x:Class="MarqueeExperiment.Samples.MarqueeBehaviorSample" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
31 | 31 |
|
32 | 32 | <TextBlock Margin="0,16,0,0" |
33 | 33 | FontWeight="Bold" |
34 | | - Text="This Marquee will loop while hovered and pause when not hovered." /> |
| 34 | + Text="This Marquee contains hyperlinks and will pause while hovered." /> |
35 | 35 | <controls:Marquee x:Name="MarqueeControl" |
36 | 36 | Background="Transparent" |
37 | 37 | Behavior="Looping" |
38 | | - 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." |
39 | 38 | FontSize="18" |
40 | 39 | RepeatBehavior="Forever" |
| 40 | + AutoPlay="True" |
41 | 41 | Speed="96"> |
| 42 | + <controls:Marquee.ContentTemplate> |
| 43 | + <DataTemplate> |
| 44 | + <StackPanel Spacing="4"> |
| 45 | + <RichTextBlock> |
| 46 | + <Paragraph> |
| 47 | + <Run Text="Lorem ipsum dolor sit amet, "/> |
| 48 | + <Hyperlink>consectetur adipiscing elit</Hyperlink> |
| 49 | + <Run Text=", sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "/> |
| 50 | + <Hyperlink>Ut enim ad minim veniam</Hyperlink> |
| 51 | + <Run Text=", quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."/> |
| 52 | + </Paragraph> |
| 53 | + </RichTextBlock> |
| 54 | + </StackPanel> |
| 55 | + </DataTemplate> |
| 56 | + </controls:Marquee.ContentTemplate> |
42 | 57 | <interactivity:Interaction.Behaviors> |
43 | 58 | <interactivity:EventTriggerBehavior EventName="PointerEntered" |
44 | 59 | SourceObject="{Binding ElementName=MarqueeControl}"> |
45 | | - <interactivity:CallMethodAction MethodName="StartMarquee" |
| 60 | + <interactivity:CallMethodAction MethodName="PauseMarquee" |
46 | 61 | TargetObject="{Binding ElementName=MarqueeControl}" /> |
47 | 62 | </interactivity:EventTriggerBehavior> |
48 | 63 | <interactivity:EventTriggerBehavior EventName="PointerExited" |
49 | 64 | SourceObject="{Binding ElementName=MarqueeControl}"> |
50 | | - <interactivity:CallMethodAction MethodName="PauseMarquee" |
| 65 | + <interactivity:CallMethodAction MethodName="StartMarquee" |
51 | 66 | TargetObject="{Binding ElementName=MarqueeControl}" /> |
52 | 67 | </interactivity:EventTriggerBehavior> |
53 | 68 | </interactivity:Interaction.Behaviors> |
|
0 commit comments