private static ImplicitAnimationCollection GetImplicitAnimationCollection(AnimationCollection collection, UIElement element)
        {
            if (ApiInformationHelper.IsCreatorsUpdateOrAbove && collection.ContainsTranslationAnimation)
            {
                ElementCompositionPreview.SetIsTranslationEnabled(element, true);
            }

            return(collection.GetImplicitAnimationCollection(element));
        }
        private static ImplicitAnimationCollection GetImplicitAnimationCollection(AnimationCollection collection, UIElement element)
        {
            if (collection.ContainsTranslationAnimation)
            {
                ElementCompositionPreview.SetIsTranslationEnabled(element, true);
            }

            return(collection.GetImplicitAnimationCollection(element));
        }
        /// <summary>
        /// Gets the value of the Implicit.Animations XAML attached property.
        /// </summary>
        /// <param name="obj">The <see cref="FrameworkElement"/> to get the value from</param>
        /// <returns><see cref="AnimationCollection"/></returns>
        public static AnimationCollection GetAnimations(DependencyObject obj)
        {
            var collection = (AnimationCollection)obj.GetValue(AnimationsProperty);

            if (collection == null)
            {
                collection = new AnimationCollection();
                obj.SetValue(AnimationsProperty, collection);
            }

            return(collection);
        }
 /// <summary>
 /// Sets the value of the Implicit.HideAnimations XAML attached property.
 /// </summary>
 /// <param name="obj">The <see cref="FrameworkElement"/> to set the value</param>
 /// <param name="value">The <see cref="AnimationCollection"/> to set</param>
 public static void SetHideAnimations(DependencyObject obj, AnimationCollection value)
 {
     obj.SetValue(HideAnimationsProperty, value);
 }