Compositor.CreateStepEasingFunction 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateStepEasingFunction() |
创建 StepEasingFunction 的实例。 |
CreateStepEasingFunction(Int32) |
使用指定的步骤计数创建 StepEasingFunction 的实例。 |
CreateStepEasingFunction()
创建 StepEasingFunction 的实例。
public:
virtual StepEasingFunction ^ CreateStepEasingFunction() = CreateStepEasingFunction;
/// [Windows.Foundation.Metadata.Overload("CreateStepEasingFunction")]
StepEasingFunction CreateStepEasingFunction();
[Windows.Foundation.Metadata.Overload("CreateStepEasingFunction")]
public StepEasingFunction CreateStepEasingFunction();
function createStepEasingFunction()
Public Function CreateStepEasingFunction () As StepEasingFunction
返回
返回创建的 StepEasingFunction 对象。
- 属性
示例
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);
}
另请参阅
适用于
CreateStepEasingFunction(Int32)
使用指定的步骤计数创建 StepEasingFunction 的实例。
public:
virtual StepEasingFunction ^ CreateStepEasingFunction(int stepCount) = CreateStepEasingFunction;
/// [Windows.Foundation.Metadata.Overload("CreateStepEasingFunctionWithStepCount")]
StepEasingFunction CreateStepEasingFunction(int const& stepCount);
[Windows.Foundation.Metadata.Overload("CreateStepEasingFunctionWithStepCount")]
public StepEasingFunction CreateStepEasingFunction(int stepCount);
function createStepEasingFunction(stepCount)
Public Function CreateStepEasingFunction (stepCount As Integer) As StepEasingFunction
参数
- stepCount
-
Int32
int
StepEasingFunction 的步骤计数。
返回
返回创建的 StepEasingFunction 对象。
- 属性