Jumar Macato
8 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
2 changed files with
3 additions and
3 deletions
-
src/Avalonia.Animation/TransitionInstance.cs
-
src/Avalonia.Animation/Transition`1.cs
|
|
|
@ -13,13 +13,13 @@ namespace Avalonia.Animation |
|
|
|
/// <summary>
|
|
|
|
/// Handles the timing and lifetime of a <see cref="Transition{T}"/>.
|
|
|
|
/// </summary>
|
|
|
|
internal class TransitionIteration : SingleSubscriberObservableBase<double> |
|
|
|
internal class TransitionInstance : SingleSubscriberObservableBase<double> |
|
|
|
{ |
|
|
|
private IDisposable timerSubscription; |
|
|
|
private TimeSpan startTime; |
|
|
|
private TimeSpan duration; |
|
|
|
|
|
|
|
public TransitionIteration(TimeSpan Duration) |
|
|
|
public TransitionInstance(TimeSpan Duration) |
|
|
|
{ |
|
|
|
duration = Duration; |
|
|
|
} |
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ namespace Avalonia.Animation |
|
|
|
/// <inheritdocs/>
|
|
|
|
public virtual IDisposable Apply(Animatable control, object oldValue, object newValue) |
|
|
|
{ |
|
|
|
var transition = DoTransition(new TransitionIteration(Duration), (T)oldValue, (T)newValue); |
|
|
|
var transition = DoTransition(new TransitionInstance(Duration), (T)oldValue, (T)newValue); |
|
|
|
return control.Bind<T>((AvaloniaProperty<T>)Property, transition, Data.BindingPriority.Animation); |
|
|
|
} |
|
|
|
|
|
|
|
|