CompositionBatchCompletedEventArgs 類別

定義

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
繼承
Object Platform::Object IInspectable CompositionObject CompositionBatchCompletedEventArgs
屬性

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

用來建立這個CompositionObjectCompositor

(繼承來源 CompositionObject)
Dispatcher

CompositionObject的發送器。

(繼承來源 CompositionObject)
DispatcherQueue

取得 CompostionObject 的 DispatcherQueue

(繼承來源 CompositionObject)
ImplicitAnimations

附加至這個物件的隱含動畫集合。

(繼承來源 CompositionObject)
Properties

CompositionObject相關聯的屬性集合。

(繼承來源 CompositionObject)

方法

Close()

關閉 CompositionObject 並釋放系統資源。

(繼承來源 CompositionObject)
ConnectAnimation(String, CompositionAnimation)

連接和動畫。

(繼承來源 CompositionObject)
DisconnectAnimation(String)

中斷動畫的連接。

(繼承來源 CompositionObject)
Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

(繼承來源 CompositionObject)
PopulatePropertyInfo(String, AnimationPropertyInfo)

定義可以產生動畫效果的屬性。

(繼承來源 CompositionObject)
StartAnimation(String, CompositionAnimation)

使用物件的指定屬性連接動畫,並啟動動畫。

(繼承來源 CompositionObject)
StartAnimation(String, CompositionAnimation, AnimationController)

使用物件的指定屬性連接動畫,並啟動動畫。

(繼承來源 CompositionObject)
StartAnimationGroup(ICompositionAnimationBase)

啟動動畫群組。

CompositionObject上的 StartAnimationGroup 方法可讓您啟動CompositionAnimationGroup。 群組中的所有動畫都會在 物件上同時啟動。

(繼承來源 CompositionObject)
StopAnimation(String)

中斷與指定屬性的動畫連線,並停止動畫。

(繼承來源 CompositionObject)
StopAnimationGroup(ICompositionAnimationBase)

停止動畫群組。

(繼承來源 CompositionObject)
TryGetAnimationController(String)

傳回在指定屬性上執行的動畫的 AnimationController。

(繼承來源 CompositionObject)

適用於

另請參閱