ExponentialEase ExponentialEase ExponentialEase Class

Represents an easing function that creates an animation that accelerates and/or decelerates using an exponential formula.

Syntax

Declaration

public sealed class ExponentialEasepublic sealed class ExponentialEasePublic NotInheritable Class ExponentialEase
<ExponentialEase .../>

Inheritance Hierarchy

Remarks

ExponentialEase is an easing function that has a function-over-time formula that uses an Exponent value to shape the function-over-time curve. The value used for Exponent changes the shape of the curve quite a bit. Exponent can be negative, if so the function acts a bit like changing the EasingMode to EaseOut with a positive value. You might want to experiment with different values for Exponent and EasingMode when using this easing function.

An easing function can be applied to the EasingFunction properties of From/To/By animations, or to the EasingFunction properties of key-frame types used for the Easing variants of key-frame animations. For more info, see Key-frame animations and easing function animations.

Examples

This XAML example applies a ExponentialEase easing function to a DoubleAnimation to create a decelerating animation.

<StackPanel x:Name="LayoutRoot" >
    <StackPanel.Resources>
        <Storyboard x:Name="myStoryboard">
            <DoubleAnimation From="1" To="6" Duration="00:00:3" 
                Storyboard.TargetName="rectScaleTransform" 
                Storyboard.TargetProperty="ScaleY">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase Exponent="6" EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </StackPanel.Resources>

    <Rectangle PointerPressed="Pointer_Clicked" 
     Fill="Blue" Width="200" Height="30">
        <Rectangle.RenderTransform>
            <ScaleTransform x:Name="rectScaleTransform" />
        </Rectangle.RenderTransform>
    </Rectangle>

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

Constructors summary

Initializes a new instance of the ExponentialEase class.

Properties summary

Gets or sets the exponent used to determine the interpolation of the animation.

Identifies the Exponent dependency property.

Constructors

  • ExponentialEase()
    ExponentialEase()
    ExponentialEase()
    ExponentialEase()

    Initializes a new instance of the ExponentialEase class.

    public ExponentialEase()public New()Public Sub New()public ExponentialEase()

Properties

  • Exponent
    Exponent
    Exponent
    Exponent

    Gets or sets the exponent used to determine the interpolation of the animation.

    public double Exponent { get; set; }public double Exponent { get; set; }Public ReadWrite Property Exponent As doublepublic double Exponent { get; set; }
    <ExponentialEase Exponent="double" .../>
    

    Property Value

    • double
      double
      double

      The exponent used to determine the interpolation of the animation. The default is 2.

  • ExponentProperty
    ExponentProperty
    ExponentProperty
    ExponentProperty

    Identifies the Exponent dependency property.

    public static DependencyProperty ExponentProperty { get; }public static DependencyProperty ExponentProperty { get; }Public Static ReadOnly Property ExponentProperty As DependencyPropertypublic static DependencyProperty ExponentProperty { get; }

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Media.Animation.dll