ImplicitAnimationSet Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of implicit animations that can be assigned to a Windows.UI.Xaml.UIElement and configured to be run automatically when the element is either shown or hidden (through ShowAnimationsProperty and HideAnimationsProperty), or whenever one of the targeted properties on the underlying Windows.UI.Composition.Visual element changes (through AnimationsProperty).
Animations within an ImplicitAnimationSet should be objects implementing the IImplicitTimeline interface, such as types inheriting from ImplicitAnimation<TValue,TKeyFrame> (eg. OpacityAnimation, TranslationAnimation, OffsetAnimation and ScaleAnimation, or custom ones such as ScalarAnimation and Vector3Animation). Adding incompatible elements cannot be validated at build-time, but will result in a runtime crash.
Animations will monitor for changes in real-time to any of their public properties. For instance, if a binding is used to dynamically update the To or From properties, the entire animation set will be initialized again and assigned to the underlying Windows.UI.Composition.Visual object for the targeted Windows.UI.Xaml.UIElement. This does not currently apply to changes to the KeyFrames property though (other than the entire property being reassigned). To achieve dynamic updates to animation sets in that case, either leverage expression keyframes or just use code-behind to manually reinitialize the animations.
public sealed class ImplicitAnimationSet : Windows.UI.Xaml.DependencyObjectCollection
type ImplicitAnimationSet = class
inherit DependencyObjectCollection
Public NotInheritable Class ImplicitAnimationSet
Inherits DependencyObjectCollection
- Inheritance
-
Windows.UI.Xaml.DependencyObjectCollectionImplicitAnimationSet
Remarks
An ImplicitAnimationSet instance can only be used on a single Windows.UI.Xaml.UIElement target, and it cannot be shared across multiple elements. Attempting to do so will result in a runtime crash. Furthermore, it is recommended not to move IImplicitTimeline instances from one ImplicitAnimationSet to another, and doing so will add unnecessary runtime overhead over time. If you want to apply the same animations to multiple elements, simply create another ImplicitAnimationSet instance and another set of animations with the same properties within it.
Constructors
ImplicitAnimationSet() |
Initializes a new instance of the ImplicitAnimationSet class. |