|
|
@ -93,17 +93,17 @@ namespace Avalonia.Animation |
|
|
var oldTransitions = change.OldValue.GetValueOrDefault<Transitions>(); |
|
|
var oldTransitions = change.OldValue.GetValueOrDefault<Transitions>(); |
|
|
var newTransitions = change.NewValue.GetValueOrDefault<Transitions>(); |
|
|
var newTransitions = change.NewValue.GetValueOrDefault<Transitions>(); |
|
|
|
|
|
|
|
|
if (oldTransitions is object) |
|
|
|
|
|
{ |
|
|
|
|
|
oldTransitions.CollectionChanged -= TransitionsCollectionChanged; |
|
|
|
|
|
RemoveTransitions(oldTransitions); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (newTransitions is object) |
|
|
if (newTransitions is object) |
|
|
{ |
|
|
{ |
|
|
newTransitions.CollectionChanged += TransitionsCollectionChanged; |
|
|
newTransitions.CollectionChanged += TransitionsCollectionChanged; |
|
|
AddTransitions(newTransitions); |
|
|
AddTransitions(newTransitions); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (oldTransitions is object) |
|
|
|
|
|
{ |
|
|
|
|
|
oldTransitions.CollectionChanged -= TransitionsCollectionChanged; |
|
|
|
|
|
RemoveTransitions(oldTransitions); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
else if (_transitionsEnabled && |
|
|
else if (_transitionsEnabled && |
|
|
Transitions is object && |
|
|
Transitions is object && |
|
|
@ -111,8 +111,10 @@ namespace Avalonia.Animation |
|
|
!change.Property.IsDirect && |
|
|
!change.Property.IsDirect && |
|
|
change.Priority > BindingPriority.Animation) |
|
|
change.Priority > BindingPriority.Animation) |
|
|
{ |
|
|
{ |
|
|
foreach (var transition in Transitions) |
|
|
for (var i = Transitions.Count -1; i >= 0; --i) |
|
|
{ |
|
|
{ |
|
|
|
|
|
var transition = Transitions[i]; |
|
|
|
|
|
|
|
|
if (transition.Property == change.Property) |
|
|
if (transition.Property == change.Property) |
|
|
{ |
|
|
{ |
|
|
var state = _transitionState[transition]; |
|
|
var state = _transitionState[transition]; |
|
|
|