1- <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1+ <!--< Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+ xmlns:ani="using:Microsoft.Toolkit.Uwp.UI.Animations"
34 xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
45 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
56 xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
2122 </TextBox>
2223
2324 <Button Background="Gray" Margin="0,40,0,0" Width="200" Height="200" HorizontalAlignment="Center" VerticalAlignment="Center">
24- <Explicit.Animations>
25- <AnimationSet x:Name="MoveAnimation" IsSequential="True">
26- <TranslationAnimation Duration="0:0:3" To="0,32,0" From="0,0,0" />
27- <StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeOutAnimation}" />
28- <StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeInAnimation}" />
29- <TranslationAnimation Duration="0:0:1" To="0,0,0" From="0,32,0" />
30- </AnimationSet>
31- </Explicit.Animations>
25+ <ani: Explicit.Animations>
26+ <ani: AnimationSet x:Name="MoveAnimation" IsSequential="True">
27+ <ani: TranslationAnimation Duration="0:0:3" To="0,32,0" From="0,0,0" />
28+ <ani: StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeOutAnimation}"/>
29+ <ani: StartAnimationActivity Delay="0:0:3" Animation="{Binding ElementName=FadeInAnimation}"/>
30+ <ani: TranslationAnimation Duration="0:0:1" To="0,0,0" From="0,32,0" />
31+ </ani: AnimationSet>
32+ </ani: Explicit.Animations>
3233
3334 <Image Source="ms-appx:///Assets/ToolkitLogo.png" Height="100" Width="100">
34- <Explicit.Animations>
35- <AnimationSet x:Name="FadeOutAnimation">
36- <OpacityAnimation From="1"
35+ <ani: Explicit.Animations>
36+ <ani: AnimationSet x:Name="FadeOutAnimation">
37+ <ani: OpacityAnimation From="1"
3738 To="0"
3839 Duration="0:0:1"
3940 Delay="0"
4041 EasingType="Linear"
41- EasingMode="EaseOut" />
42- </AnimationSet>
43- <AnimationSet x:Name="FadeInAnimation">
44- <OpacityAnimation From="0"
42+ EasingMode="EaseOut"/>
43+ </ani: AnimationSet>
44+ <ani: AnimationSet x:Name="FadeInAnimation">
45+ <ani: OpacityAnimation From="0"
4546 To="1"
4647 Duration="0:0:1"
4748 Delay="0"
4849 EasingType="Linear"
49- EasingMode="EaseOut" />
50- </AnimationSet>
51- </Explicit.Animations>
50+ EasingMode="EaseOut"/>
51+ </ani: AnimationSet>
52+ </ani: Explicit.Animations>
5253 </Image>
5354
5455 </Button>
5556
5657 </StackPanel>
5758
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>
58110</Page>
0 commit comments