protected override Task BeginAnimation() { if (Target == null) { throw new NullReferenceException("Null Target property."); } return(Target.FadeTo(Opacity, Convert.ToUInt32(Duration), EasingHelper.GetEasing(Easing))); }
protected override Task ResetAnimation() { if (Target == null) { throw new NullReferenceException("Null Target property."); } return(Target.RelScaleTo(Scale, Convert.ToUInt32(Duration), EasingHelper.GetEasing(Easing))); }
protected override async void Invoke(VisualElement sender) { if (TargetProperty == null) { throw new NullReferenceException("Null Target property."); } if (Delay > 0) await Task.Delay(Delay); SetDefaultFrom((double)sender.GetValue(TargetProperty)); sender.Animate($"AnimateInt{TargetProperty.PropertyName}", new Animation((progress) => { sender.SetValue(TargetProperty, AnimationHelper.GetIntValue((int)From, (int)To, progress)); }), length: Duration, easing: EasingHelper.GetEasing(Easing)); }