ElasticEase.Oscillations Property

Gets or sets the number of times the target slides back and forth over the animation destination.

Namespace:  System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public int Oscillations { get; set; }
<ElasticEase Oscillations="int"/>

Property Value

Type: System.Int32
The 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.

<Rectangle Name="myRectangle" Width="200" Height="30" Fill="Blue">
        <EventTrigger RoutedEvent="Rectangle.MouseDown">
                    <DoubleAnimation From="30" To="200" Duration="00:00:4" 

                            <!-- Elastic easing function assigned to From/To animation -->
                            <ElasticEase x:Name="myElasticEase" Oscillations="3" 
                             Springiness="1" EasingMode="EaseOut"/>



.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft