ElasticEase.Oscillations Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the number of times the target slides back and forth over the animation destination.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<ElasticEase Oscillations="int"/>
Property Value
Type: System.Int32The number of times the target slides back and forth over the animation destination. This value must be greater than or equal to 0. The default is 3.
Dependency property identifier field: OscillationsProperty
The following example applies an ElasticEase easing function to a DoubleAnimation to create an animation that resembles a spring oscillating back and forth until it comes to rest.
<StackPanel x:Name="LayoutRoot" Background="Transparent"> <StackPanel.Resources> <Storyboard x:Name="myStoryboard"> <DoubleAnimation From="30" To="200" Duration="00:00:4" Storyboard.TargetName="myRectangle" Storyboard.TargetProperty="Height"> <DoubleAnimation.EasingFunction> <!-- Elastic easing function assigned to From/To animation --> <ElasticEase x:Name="myElasticEase" Oscillations="3" Springiness="1" EasingMode="EaseOut"/> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </StackPanel.Resources> <Rectangle x:Name="myRectangle" MouseLeftButtonDown="Mouse_Clicked" Fill="Blue" Width="200" Height="30" /> </StackPanel>
Show: