Exemple #1
0
 internal DUCE.ResourceHandle GetAnimationResourceHandle(DependencyProperty dp, DUCE.Channel channel)
 {
     if (channel != null && IAnimatable_HasAnimatedProperties)
     {
         return(IndependentAnimationStorage.GetResourceHandle(this, dp, channel));
     }
     else
     {
         return(DUCE.ResourceHandle.Null);
     }
 }
Exemple #2
0
        internal void PropertyChanged(DependencyProperty dp)
        {
            AnimationStorage            animationStorage            = AnimationStorage.GetStorage(this, dp);
            IndependentAnimationStorage independentAnimationStorage = animationStorage as IndependentAnimationStorage;

            // If this property is independently animated and currently has
            // animations all we need to do is update the animation resource
            // that represents this property value. Otherwise we need to invalidate
            // and and eventually update this whole object.
            if (independentAnimationStorage != null)
            {
                independentAnimationStorage.InvalidateResource();
            }
            else
            {
                RegisterForAsyncUpdateResource();
            }
        }
Exemple #3
0
        internal static DUCE.ResourceHandle GetResourceHandle(DependencyObject d, DependencyProperty dp, DUCE.Channel channel)
        {
            Debug.Assert(d != null);
            Debug.Assert(dp != null);
            Debug.Assert(d is Animatable ? ((Animatable)d).HasAnimatedProperties : true);

            IndependentAnimationStorage storage = AnimationStorage.GetStorage(d, dp) as IndependentAnimationStorage;

            if (storage == null)
            {
                return(DUCE.ResourceHandle.Null);
            }
            else
            {
                Debug.Assert(storage._duceResource.IsOnChannel(channel));

                return(((DUCE.IResource)storage).GetHandle(channel));
            }
        }