CompositionBatchCompletedEventArgs 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public ref class CompositionBatchCompletedEventArgs sealed : CompositionObject
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CompositionBatchCompletedEventArgs final : CompositionObject
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
class CompositionBatchCompletedEventArgs final : CompositionObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CompositionBatchCompletedEventArgs : CompositionObject
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public sealed class CompositionBatchCompletedEventArgs : CompositionObject
Public NotInheritable Class CompositionBatchCompletedEventArgs
Inherits CompositionObject
- 继承
- 属性
示例
private void CreateVisuals_Click(object sender, RoutedEventArgs e)
{
//Create Scoped batch for animations
_batch = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
//Setup completion event
_batch.Completed += ScopedBatchCompleted;
//Setup animations
Animation1(_target);
_batch.End()
}
// Creates and defines the key frame animation
private void Animation1(Visual targetVisual)
{
var animation1 = _compositor.CreateVector3KeyFrameAnimation();
animation1.InsertKeyFrame(0.0f, new Vector3(100.00f, 100.00f, 0.00f));
animation1.InsertKeyFrame(0.5f, new Vector3(300.00f, 100.00f, 0.00f));
animation1.InsertKeyFrame(1.0f, new Vector3(500.00f, 100.00f, 0.00f));
animation1.Duration = TimeSpan.FromMilliseconds(2000);
targetVisual.StartAnimation("Offset", animation1);
}
public void ScopedBatchCompleted(object sender,
CompositionBatchCompletedEventArgs args)
{
_root.Children.Remove(_target);
}
}
属性
Comment |
要与 CompositionObject 关联的字符串。 (继承自 CompositionObject) |
Compositor |
用于创建此 CompositionObject 的 Compositor。 (继承自 CompositionObject) |
DispatcherQueue |
获取 CompositionObject 的 DispatcherQueue。 (继承自 CompositionObject) |
ImplicitAnimations |
附加到此对象的隐式动画集合。 (继承自 CompositionObject) |
Properties |
与 CompositionObject 关联的属性的集合。 (继承自 CompositionObject) |
方法
Close() |
关闭 CompositionObject 并释放系统资源。 (继承自 CompositionObject) |
Dispose() |
执行与释放或重置非托管资源关联的应用程序定义的任务。 (继承自 CompositionObject) |
PopulatePropertyInfo(String, AnimationPropertyInfo) |
定义可进行动画处理的属性。 (继承自 CompositionObject) |
StartAnimation(String, CompositionAnimation, AnimationController) |
使用 对象的指定属性连接动画并启动动画。 (继承自 CompositionObject) |
StartAnimation(String, CompositionAnimation) |
使用 对象的指定属性连接动画并启动动画。 (继承自 CompositionObject) |
StartAnimationGroup(ICompositionAnimationBase) |
启动动画组。 CompositionObject 上的 StartAnimationGroup 方法可用于启动 CompositionAnimationGroup。 组中的所有动画将同时在 对象上启动。 (继承自 CompositionObject) |
StopAnimation(String) |
断开动画与指定属性的连接并停止动画。 (继承自 CompositionObject) |
StopAnimationGroup(ICompositionAnimationBase) |
停止动画组。 (继承自 CompositionObject) |
TryGetAnimationController(String) |
返回指定属性上运行的动画的 AnimationController。 (继承自 CompositionObject) |