1
- <!--< Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1
+ <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
2
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3
3
xmlns:ani="using:Microsoft.Toolkit.Uwp.UI.Animations"
4
4
xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
12
12
13
13
<TextBox
14
14
PlaceholderText="Set the focus to this TextBox and press enter to trigger the animation"
15
- Width="300 ">
15
+ Width="500 ">
16
16
<interactivity:Interaction.Behaviors>
17
17
<behaviors:KeyDownTriggerBehavior
18
18
Key="Enter">
56
56
57
57
</StackPanel>
58
58
59
- </Page>-->
60
-
61
- <Page
62
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
63
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
64
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
65
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
- xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
67
- xmlns:interactions="using:Microsoft.Xaml.Interactions.Core"
68
- xmlns:ani="using:Microsoft.Toolkit.Uwp.UI.Animations"
69
- xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
70
- xmlns:core="using:Microsoft.Xaml.Interactions.Core"
71
- mc:Ignorable="d">
72
-
73
- <Button Background="Gray" Width="200" Height="200" HorizontalAlignment="Center" VerticalAlignment="Center">
74
- <ani:Explicit.Animations>
75
- <ani:AnimationSet x:Name="MoveAnimation" IsSequential="True">
76
- <ani:TranslationAnimation Duration="0:0:3" To="0,32,0" From="0,0,0" />
77
- <ani:StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeOutAnimation}"/>
78
- <ani:StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeInAnimation}"/>
79
- <ani:TranslationAnimation Duration="0:0:1" To="0,0,0" From="0,32,0" />
80
- </ani:AnimationSet>
81
- </ani:Explicit.Animations>
82
-
83
- <Image Source="ms-appx:///Assets/ToolkitLogo.png" Height="100" Width="100">
84
- <ani:Explicit.Animations>
85
- <ani:AnimationSet x:Name="FadeOutAnimation">
86
- <ani:OpacityAnimation From="1"
87
- To="0"
88
- Duration="0:0:1"
89
- Delay="0"
90
- EasingType="Linear"
91
- EasingMode="EaseOut"/>
92
- </ani:AnimationSet>
93
- <ani:AnimationSet x:Name="FadeInAnimation">
94
- <ani:OpacityAnimation From="0"
95
- To="1"
96
- Duration="0:0:1"
97
- Delay="0"
98
- EasingType="Linear"
99
- EasingMode="EaseOut"/>
100
- </ani:AnimationSet>
101
- </ani:Explicit.Animations>
102
- </Image>
103
-
104
- <interactivity:Interaction.Behaviors>
105
- <interactions:EventTriggerBehavior EventName="Click">
106
- <behaviors:StartAnimationAction Animation="{Binding ElementName=MoveAnimation}"/>
107
- </interactions:EventTriggerBehavior>
108
- </interactivity:Interaction.Behaviors>
109
- </Button>
110
59
</Page>
0 commit comments