Пример #1
0
        public override IDisposable BindAnimation(Animatable control, IObservable <ISolidColorBrush?> instance)
        {
            if (Property is null)
            {
                throw new InvalidOperationException("Animator has no property specified.");
            }

            return(control.Bind((AvaloniaProperty <IBrush?>)Property, instance, BindingPriority.Animation));
        }
Пример #2
0
        public virtual IDisposable BindAnimation(Animatable control, IObservable <T> instance)
        {
            if (Property is null)
            {
                throw new InvalidOperationException("Animator has no property specified.");
            }

            return(control.Bind((AvaloniaProperty <T>)Property, instance, BindingPriority.Animation));
        }
Пример #3
0
        /// <summary>
        /// Runs the KeyFrames Animation.
        /// </summary>
        internal IDisposable Run(Animation animation, Animatable control, IClock clock, Action onComplete)
        {
            var instance = new AnimationInstance <T>(
                animation,
                control,
                this,
                clock ?? control.Clock ?? Clock.GlobalClock,
                onComplete,
                InterpolationHandler);

            return(control.Bind <T>((AvaloniaProperty <T>)Property, instance, BindingPriority.Animation));
        }
Пример #4
0
 public override IDisposable BindAnimation(Animatable control, IObservable <ISolidColorBrush?> instance)
 {
     return(control.Bind((AvaloniaProperty <IBrush?>)Property, instance, BindingPriority.Animation));
 }
Пример #5
0
 public virtual IDisposable BindAnimation(Animatable control, IObservable <T> instance)
 {
     return(control.Bind((AvaloniaProperty <T>)Property, instance, BindingPriority.Animation));
 }
 /// <inheritdocs/>
 public virtual IDisposable Apply(Animatable control, IClock clock, object oldValue, object newValue)
 {
     var transition = DoTransition(new TransitionInstance(clock, Delay, Duration), (T) oldValue, (T) newValue);
     return control.Bind<T>((AvaloniaProperty<T>) Property, transition, Avalonia.Data.BindingPriority.Animation);
 }