Compositor.CreateStepEasingFunction Compositor.CreateStepEasingFunction Compositor.CreateStepEasingFunction Compositor.CreateStepEasingFunction Method

Definition

Overloads

CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction()

Creates an instance of StepEasingFunction.

CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32)

Creates an instance of StepEasingFunction with the specified step count.

CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction() CreateStepEasingFunction()

Creates an instance of StepEasingFunction.

public : StepEasingFunction CreateStepEasingFunction()
StepEasingFunction CreateStepEasingFunction() const;
public StepEasingFunction CreateStepEasingFunction()
Public Function CreateStepEasingFunction() As StepEasingFunction

Returns

Additional features and requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Examples


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(); 
  steps.StepCount = 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); 

  // Run animation for 4 times 
  animation.IterationCount = 4; 

  heroVisual.StartAnimation("Offset", animation); 
} 
         
         
See also

CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32) CreateStepEasingFunction(Int32)

Creates an instance of StepEasingFunction with the specified step count.

public : StepEasingFunction CreateStepEasingFunction(int stepCount)
StepEasingFunction CreateStepEasingFunction(int32_t stepCount) const;
public StepEasingFunction CreateStepEasingFunction(Int32 stepCount)
Public Function CreateStepEasingFunction(stepCount As Int32) As StepEasingFunction

Parameters

stepCount
Int32 Int32

The step count for the StepEasingFunction.

Returns

Additional features and requirements

Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
See also