Share via


BackEase.Amplitude Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the amplitude of retraction associated with a BackEase animation.

Namespace:  System.Windows.Media.Animation
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property Amplitude As Double
public double Amplitude { get; set; }
<BackEase Amplitude="double" .../>

Property Value

Type: System.Double
The amplitude of retraction associated with a BackEase animation. This value must be greater than or equal to 0. The default is 1.

Remarks

Dependency property identifier field: AmplitudeProperty

The larger the amplitude, the larger the retraction before and/or after the animation.

Demonstrates different aplitude values.

Examples

The following example applies a BackEase easing function to a DoubleAnimation to create an animation that retracts slightly at the beginning and end of the animation.

Run this sample

<StackPanel x:Name="LayoutRoot" Background="White">
    <StackPanel.Resources>
        <Storyboard x:Name="myStoryboard">
            <DoubleAnimation From="1" To="2" Duration="00:00:1" 
                Storyboard.TargetName="myScaleTransform" 
                Storyboard.TargetProperty="ScaleX">
                <DoubleAnimation.EasingFunction>
                    <BackEase Amplitude="0.3" EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation From="1" To="2" Duration="00:00:1" 
                Storyboard.TargetName="myScaleTransform" 
                Storyboard.TargetProperty="ScaleY">
                <DoubleAnimation.EasingFunction>
                    <BackEase Amplitude="0.3" EasingMode="EaseInOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

    <Rectangle Margin="60" x:Name="myRectangle" MouseLeftButtonDown="Mouse_Clicked" 
     Fill="Blue" Width="50" Height="50" >

        <Rectangle.RenderTransform>
            <ScaleTransform x:Name="myScaleTransform" />
        </Rectangle.RenderTransform>

    </Rectangle>
</StackPanel>
' When the user clicks the rectangle, the animation
' begins. 
Private Sub Mouse_Clicked(ByVal sender As Object, ByVal e As MouseEventArgs)
    myStoryboard.Begin()
End Sub
// When the user clicks the rectangle, the animation
// begins. 
private void Mouse_Clicked(object sender, MouseEventArgs e)
{
    myStoryboard.Begin();
}

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.