CompositionBatchCompletedEventArgs 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class CompositionBatchCompletedEventArgs sealed : CompositionObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [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.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CompositionBatchCompletedEventArgs : CompositionObject
Public NotInheritable Class CompositionBatchCompletedEventArgs
Inherits CompositionObject
- 繼承
- 屬性
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10586.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v2.0 引進)
|
範例
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) |
Dispatcher |
CompositionObject的發送器。 (繼承來源 CompositionObject) |
DispatcherQueue |
取得 CompostionObject 的 DispatcherQueue 。 (繼承來源 CompositionObject) |
ImplicitAnimations |
附加至這個物件的隱含動畫集合。 (繼承來源 CompositionObject) |
Properties |
與 CompositionObject相關聯的屬性集合。 (繼承來源 CompositionObject) |