Example #1
0
        public static async void Animate(this VisualElement visualElement, AnimationBase animation, Action onFinishedCallback = null)
        {
            animation.Target = visualElement;
            await animation.Begin();

            onFinishedCallback?.Invoke();
        }
Example #2
0
        public static async Task <bool> Animate(this VisualElement visualElement, AnimationBase animation)
        {
            try
            {
                animation.Target = visualElement;

                await animation.Begin();

                return(true);
            }
            catch
            {
                return(false);
            }
        }