CompositionObject.ImplicitAnimations Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Raccolta di animazioni implicite associate a questo oggetto.
public:
property ImplicitAnimationCollection ^ ImplicitAnimations { ImplicitAnimationCollection ^ get(); void set(ImplicitAnimationCollection ^ value); };
ImplicitAnimationCollection ImplicitAnimations();
void ImplicitAnimations(ImplicitAnimationCollection value);
public ImplicitAnimationCollection ImplicitAnimations { get; set; }
var implicitAnimationCollection = compositionObject.implicitAnimations;
compositionObject.implicitAnimations = implicitAnimationCollection;
Public Property ImplicitAnimations As ImplicitAnimationCollection
Valore della proprietà
Raccolta di animazioni implicite associate a questo oggetto.
Esempio
class PropertyAnimation
{
PropertyAnimation(Compositor compositor, SpriteVisual heroVisual, SpriteVisual listVisual)
{
// Define ImplicitAnimationCollection
ImplicitAnimationCollection implicitAnimations = compositor.CreateImplicitAnimationCollection();
// Trigger animation when the “Offset” property changes.
implicitAnimations["Offset"] = CreateAnimation(compositor);
// Assign ImplicitAnimations to a visual. Unlike Visual.Children,
// ImplicitAnimations can be shared by multiple visuals so that they
// share the same implicit animation behavior (same as Visual.Clip).
heroVisual.ImplicitAnimations = implicitAnimations;
// ImplicitAnimations can be shared among visuals
listVisual.ImplicitAnimations = implicitAnimations;
listVisual.Offset = new Vector3(20f, 20f, 20f);
}
Vector3KeyFrameAnimation CreateAnimation(Compositor compositor)
{
Vector3KeyFrameAnimation animation = compositor.CreateVector3KeyFrameAnimation();
animation.InsertExpressionKeyFrame(0f, "this.StartingValue");
animation.InsertExpressionKeyFrame(1f, "this.FinalValue");
animation.Target = “Offset”;
animation.Duration = TimeSpan.FromSeconds(0.25);
return animation;
}
}