EasingFunctionBase.EaseInCore Method

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

Provides the logic portion of the easing function that you can override to produce the EaseIn mode of the custom easing function.

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

Syntax

'Declaration
Protected MustOverride Function EaseInCore ( _
    normalizedTime As Double _
) As Double
protected abstract double EaseInCore(
    double normalizedTime
)

Parameters

  • normalizedTime
    Type: System.Double
    Normalized time (progress) of the animation.

Return Value

Type: System.Double
A double that represents the transformed progress.

Remarks

This method transforms normalized time to control the pace of an animation for the EaseIn case of EasingMode.

You only have to specify your easing function for the EaseIn case because the implementation of the Ease method transforms normalizedTime for the EaseOut and EaseInOut cases.

Examples

The following example demonstrates how to create a simple custom easing function. You can add your own mathematical logic for how the easing function behaves by overriding the EaseInCore method.

Run this sample

namespace CustomEasingFunction
{
    public class CustomSeventhPowerEasingFunction : EasingFunctionBase
    {
        public CustomSeventhPowerEasingFunction() : base() 
        { 
        }   

        // Specify your own logic for the easing function by overriding
        // the EaseInCore method. Note that this logic applies to the "EaseIn"
        // mode of interpolation. 
        protected override double EaseInCore(double normalizedTime) 
        { 
            // applies the formula of time to the seventh power.
            return Math.Pow(normalizedTime, 7);
        }

    }
}

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.