<UserControl x:Class="AnimationEasings.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" |
Width="300" Height="450"> |
<UserControl.Resources> |
<Storyboard x:Name="sbBackEaseIn"> |
<DoubleAnimation From="50" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BackEase EasingMode="EaseIn" Amplitude="0.5"></BackEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbBackEaseOut"> |
<DoubleAnimation From="0" To="350" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BackEase EasingMode="EaseOut" Amplitude="0.5"></BackEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbBackEaseInOut"> |
<DoubleAnimation From="50" To="350" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BackEase EasingMode="EaseInOut" Amplitude="0.5"></BackEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbBounceEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BounceEase Bounces="10" Bounciness="2" |
EasingMode="EaseIn"></BounceEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbBounceEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BounceEase Bounces="10" Bounciness="2" |
EasingMode="EaseOut"></BounceEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbBounceEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<BounceEase Bounces="10" Bounciness="2" |
EasingMode="EaseInOut"></BounceEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbCircleEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CircleEase EasingMode="EaseIn"></CircleEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbCircleEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CircleEase EasingMode="EaseOut"></CircleEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbCircleEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CircleEase EasingMode="EaseInOut"></CircleEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbCubicEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CubicEase EasingMode="EaseIn"></CubicEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbCubicEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CubicEase EasingMode="EaseOut"></CubicEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbCubicEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<CubicEase EasingMode="EaseInOut"></CubicEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbElasticEaseIn"> |
<DoubleAnimation From="130" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ElasticEase Springiness="5" Oscillations="3" |
EasingMode="EaseIn"></ElasticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbElasticEaseOut"> |
<DoubleAnimation From="0" To="270" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ElasticEase Springiness="5" Oscillations="3" |
EasingMode="EaseOut"></ElasticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbElasticEaseInOut"> |
<DoubleAnimation From="130" To="270" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ElasticEase Springiness="5" Oscillations="3" |
EasingMode="EaseInOut"></ElasticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbExponentialEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ExponentialEase Exponent="3" |
EasingMode="EaseIn"></ExponentialEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbExponentialEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ExponentialEase Exponent="3" |
EasingMode="EaseOut"></ExponentialEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbExponentialEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<ExponentialEase Exponent="3" |
EasingMode="EaseInOut"></ExponentialEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbPowerEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<PowerEase Power="3" |
EasingMode="EaseIn"></PowerEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbPowerEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<PowerEase Power="3" |
EasingMode="EaseOut"></PowerEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbPowerEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<PowerEase Power="3" |
EasingMode="EaseInOut"></PowerEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbQuadraticEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuadraticEase EasingMode="EaseIn"></QuadraticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuadraticEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuadraticEase EasingMode="EaseOut"></QuadraticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuadraticEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuadraticEase EasingMode="EaseInOut"></QuadraticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbQuarticEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuarticEase EasingMode="EaseIn"></QuarticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuarticEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuarticEase EasingMode="EaseOut"></QuarticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuarticEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuarticEase EasingMode="EaseInOut"></QuarticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbQuinticEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuinticEase EasingMode="EaseIn"></QuinticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuinticEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuinticEase EasingMode="EaseOut"></QuinticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbQuinticEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<QuinticEase EasingMode="EaseInOut"></QuinticEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
|
<Storyboard x:Name="sbSineEaseIn"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<SineEase EasingMode="EaseIn"></SineEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbSineEaseOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<SineEase EasingMode="EaseOut"></SineEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
<Storyboard x:Name="sbSineEaseInOut"> |
<DoubleAnimation From="0" To="400" |
Duration="0:0:10" Storyboard.TargetName="circle" |
Storyboard.TargetProperty="(Canvas.Top)"> |
<DoubleAnimation.EasingFunction> |
<SineEase EasingMode="EaseInOut"></SineEase> |
</DoubleAnimation.EasingFunction> |
</DoubleAnimation> |
</Storyboard> |
</UserControl.Resources> |
|
<Canvas x:Name="LayoutRoot" Background="LightYellow"> |
<Ellipse x:Name="circle" Width="50" |
Height="50" Canvas.Top="0" Canvas.Left="50"> |
<Ellipse.Fill> |
<ImageBrush x:Name="backgroundImageBrush" Stretch="UniformToFill"> |
<ImageBrush.ImageSource> |
<BitmapImage x:Name="bmpBackground" |
UriSource="http://www.silverlightshow.net/Storage/Users/nikolayraychev/sls_icon.jpg"> |
</BitmapImage> |
</ImageBrush.ImageSource> |
</ImageBrush> |
</Ellipse.Fill> |
</Ellipse> |
<TextBlock Text="Mode" Canvas.Left="150" Canvas.Top="20"></TextBlock> |
<ComboBox x:Name="cbMode" Canvas.Left="150" Canvas.Top="40" |
SelectedIndex="0" Width="140"> |
<ComboBox.Items> |
<ComboBoxItem Name="EaseIn" Content="EaseIn"></ComboBoxItem> |
<ComboBoxItem Name="EaseOut" Content="EaseOut"></ComboBoxItem> |
<ComboBoxItem Name="EaseInOut" Content="EaseInOut"></ComboBoxItem> |
</ComboBox.Items> |
</ComboBox> |
<TextBlock Text="Easing" Canvas.Left="150" Canvas.Top="70"></TextBlock> |
<ComboBox x:Name="cbEasing" Canvas.Left="150" Canvas.Top="90" |
SelectedIndex="0" Width="140"> |
<ComboBox.Items> |
<ComboBoxItem Name="BackEase" Content="BackEase"></ComboBoxItem> |
<ComboBoxItem Name="BounceEase" Content="BounceEase"></ComboBoxItem> |
<ComboBoxItem Name="CircleEase" Content="CircleEase"></ComboBoxItem> |
<ComboBoxItem Name="CubicEase" Content="CubicEase"></ComboBoxItem> |
<ComboBoxItem Name="ElasticEase" Content="ElasticEase"></ComboBoxItem> |
<ComboBoxItem Name="ExponentialEase" Content="ExponentialEase"></ComboBoxItem> |
<ComboBoxItem Name="PowerEase" Content="PowerEase"></ComboBoxItem> |
<ComboBoxItem Name="QuadraticEase" Content="QuadraticEase"></ComboBoxItem> |
<ComboBoxItem Name="QuarticEase" Content="QuarticEase"></ComboBoxItem> |
<ComboBoxItem Name="QuinticEase" Content="QuinticEase"></ComboBoxItem> |
<ComboBoxItem Name="SineEase" Content="SineEase"></ComboBoxItem> |
</ComboBox.Items> |
</ComboBox> |
<Button x:Name="btnStart" Canvas.Left="150" Canvas.Top="140" |
Width="140" Content="Start" Click="btnStart_Click"></Button> |
</Canvas> |
|
</UserControl> |