StepEasingFunction
StepEasingFunction
StepEasingFunction
StepEasingFunction
Class
Definition
A step function for interpolating between animation key frames.
Advances animations in increments like steps which can be can be defined. Behaviors for initial and final steps can be customized.
public : sealed class StepEasingFunction : CompositionEasingFunction, IStepEasingFunctionpublic sealed class StepEasingFunction : CompositionEasingFunction, IStepEasingFunctionPublic NotInheritable Class StepEasingFunction Inherits CompositionEasingFunction Implements IStepEasingFunction// This API is not available in Javascript.
- Inheritance
-
CompositionEasingFunctionCompositionEasingFunctionCompositionEasingFunctionCompositionEasingFunctionStepEasingFunctionStepEasingFunctionStepEasingFunctionStepEasingFunction
- Attributes
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Inherited Members
Inherited methods
Inherited properties
Examples
class StepsEasing
{
StepsEasing(Compositor compositor, SpriteVisual heroVisual)
{
// This step function makes the property offset change in 5 steps
// i.e. goes from (0,0,0) à (20,20,20) in 5 steps.
StepEasingFunction steps = compositor.CreateStepEasingFunction(5);
Vector3KeyFrameAnimation animation = compositor.CreateVector3KeyFrameAnimation();
animation.InsertKeyFrame(0f, new Vector3(0f,0f,0f));
animation.InsertKeyFrame(1f, new Vector3(20f,20f,0f), steps);
animation.Duration = TimeSpan.FromSeconds(2);
heroVisual.StartAnimation("Offset", animation);
}
}
Remarks
The step easing function gives more flexibility for animations to advance in increments. Increments are defined using StepCount property. Steps can be customized using InitialStep, and FinalStep. Behavior for initial step can be customized using IsInitialStepSingleFrame and final step using IsFinalStepSingleFrame.
Properties
FinalStep FinalStep FinalStep FinalStep
The step to end at.
public : int FinalStep { get; set; }public int FinalStep { get; set; }Public ReadWrite Property FinalStep As int// This API is not available in Javascript.
- Value
- int int int int
The step to end at.
InitialStep InitialStep InitialStep InitialStep
The step to start at.
public : int InitialStep { get; set; }public int InitialStep { get; set; }Public ReadWrite Property InitialStep As int// This API is not available in Javascript.
- Value
- int int int int
The step to start at.
IsFinalStepSingleFrame IsFinalStepSingleFrame IsFinalStepSingleFrame IsFinalStepSingleFrame
Indicates whether the final step should last the smallest possible duration.
public : PlatForm::Boolean IsFinalStepSingleFrame { get; set; }public bool IsFinalStepSingleFrame { get; set; }Public ReadWrite Property IsFinalStepSingleFrame As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
Boolean indicating whether the final step should last the smallest possible duration (1 frame).
IsInitialStepSingleFrame IsInitialStepSingleFrame IsInitialStepSingleFrame IsInitialStepSingleFrame
Indicates whether the initial step should last the smallest possible duration.
public : PlatForm::Boolean IsInitialStepSingleFrame { get; set; }public bool IsInitialStepSingleFrame { get; set; }Public ReadWrite Property IsInitialStepSingleFrame As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
Boolean indicating whether the initial step should last the smallest possible duration (1 frame).
StepCount StepCount StepCount StepCount
The number of steps between the starting value and the end value.
public : int StepCount { get; set; }public int StepCount { get; set; }Public ReadWrite Property StepCount As int// This API is not available in Javascript.
- Value
- int int int int
The number of steps between the starting value and the end value.