Amplitude Property
Collapse the table of content
Expand the table of content

BackEase.Amplitude Property

 

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

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

public double Amplitude { get; set; }

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 value is 1.

Dependency property identifier field: AmplitudeProperty

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

Demonstrates different aplitude values.

<object Amplitude="double" .../>

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.

<Rectangle Name="MyRectangle" Margin="60" Width="50" Height="50" Fill="Blue">
      <Rectangle.Triggers>
          <EventTrigger RoutedEvent="Rectangle.MouseDown">
              <BeginStoryboard>
                  <Storyboard>
                      <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>
              </BeginStoryboard>
          </EventTrigger>
      </Rectangle.Triggers>
      <Rectangle.RenderTransform>
          <ScaleTransform x:Name="myScaleTransform" />
      </Rectangle.RenderTransform>

  </Rectangle>

.NET Framework
Available since 4.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft