Browse Source

Tried to make IsAnimating logic clearer.

Steven Kirk 8 years ago
parent
commit
d0be429bd2
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/Avalonia.Base/PriorityValue.cs

+ 11 - 1
src/Avalonia.Base/PriorityValue.cs

@@ -52,7 +52,17 @@ namespace Avalonia
             _validate = validate;
             _validate = validate;
         }
         }
 
 
-        public bool IsAnimating => ValuePriority < 0 && GetLevel(ValuePriority).ActiveBindingIndex != -1;
+        /// <summary>
+        /// Gets a value indicating whether the property is animating.
+        /// </summary>
+        public bool IsAnimating
+        {
+            get
+            {
+                return ValuePriority <= (int)BindingPriority.Animation && 
+                    GetLevel(ValuePriority).ActiveBindingIndex != -1;
+            }
+        }
 
 
         /// <summary>
         /// <summary>
         /// Gets the owner of the value.
         /// Gets the owner of the value.