示例#1
0
        /// <summary>
        /// Gets an event from the event pool and initializes it with the given values.
        /// Use this function instead of creating new events.
        /// Events obtained from this method should be released back to the pool using Dispose().
        /// </summary>
        /// <param name="stylePropertyName">The name of the style property.</param>
        /// <param name="elapsedTime">The elapsed time.</param>
        /// <returns>An initialized transition event.</returns>
        public static T GetPooled(StylePropertyName stylePropertyName, double elapsedTime)
        {
            T e = GetPooled();

            e.stylePropertyNames.propertiesList.Add(stylePropertyName);
            e.elapsedTime = elapsedTime;
            return(e);
        }
示例#2
0
 /// <summary>
 ///  Determines whether the <see cref="ITransitionEvent"/> affects the specified property.
 /// </summary>
 /// <param name="stylePropertyName">The property to check against.</param>
 /// <returns>true if the <see cref="ITransitionEvent"/> affects the specified property; otherwise, false.</returns>
 public bool AffectsProperty(StylePropertyName stylePropertyName) => stylePropertyNames.Contains(stylePropertyName);