CompositionBatchCompletedEventArgs Klasse

Definition

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
Vererbung
Object Platform::Object IInspectable CompositionObject CompositionBatchCompletedEventArgs
Attribute

Beispiele

    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);
    }      
}

Eigenschaften

Comment

Eine Zeichenfolge, die dem CompositionObject zugeordnet werden soll.

(Geerbt von CompositionObject)
Compositor

Der Compositor , der zum Erstellen dieses CompositionObject verwendet wird.

(Geerbt von CompositionObject)
DispatcherQueue

Ruft den DispatcherQueue für das CompositionObject ab.

(Geerbt von CompositionObject)
ImplicitAnimations

Die Auflistung impliziter Animationen, die diesem Objekt angefügt sind.

(Geerbt von CompositionObject)
Properties

Die Auflistung von Eigenschaften, die dem CompositionObject zugeordnet sind.

(Geerbt von CompositionObject)

Methoden

Close()

Schließt das CompositionObject und gibt Systemressourcen frei.

(Geerbt von CompositionObject)
Dispose()

Führt anwendungsspezifische Aufgaben durch, die mit der Freigabe, der Zurückgabe oder dem Zurücksetzen von nicht verwalteten Ressourcen zusammenhängen.

(Geerbt von CompositionObject)
PopulatePropertyInfo(String, AnimationPropertyInfo)

Definiert eine Eigenschaft, die animiert werden kann.

(Geerbt von CompositionObject)
StartAnimation(String, CompositionAnimation)

Verbindet eine Animation mit der angegebenen Eigenschaft des Objekts und startet die Animation.

(Geerbt von CompositionObject)
StartAnimation(String, CompositionAnimation, AnimationController)

Verbindet eine Animation mit der angegebenen Eigenschaft des Objekts und startet die Animation.

(Geerbt von CompositionObject)
StartAnimationGroup(ICompositionAnimationBase)

Startet eine Animationsgruppe.

Mit der StartAnimationGroup-Methode für CompositionObject können Sie CompositionAnimationGroup starten. Alle Animationen in der Gruppe werden gleichzeitig für das Objekt gestartet.

(Geerbt von CompositionObject)
StopAnimation(String)

Trennt eine Animation von der angegebenen Eigenschaft und beendet die Animation.

(Geerbt von CompositionObject)
StopAnimationGroup(ICompositionAnimationBase)

Beendet eine Animationsgruppe.

(Geerbt von CompositionObject)
TryGetAnimationController(String)

Gibt einen AnimationController für die Animation zurück, die für die angegebene Eigenschaft ausgeführt wird.

(Geerbt von CompositionObject)

Gilt für:

Weitere Informationen