public static async void Animate(this VisualElement visualElement, AnimationBase animation, Action onFinishedCallback = null) { animation.Target = visualElement; await animation.Begin(); onFinishedCallback?.Invoke(); }
public static async Task <bool> Animate(this VisualElement visualElement, AnimationBase animation) { try { animation.Target = visualElement; await animation.Begin(); return(true); } catch { return(false); } }