Beispiel #1
0
        void source_ContentRendered(object sender, EventArgs e)
        {
            source.ContentRendered -= source_ContentRendered;
            var ao = AssociatedObject;

            ao.RenderTransform = new TranslateTransform();
            ao.BeginStoryboard(AnimationProducer.GetAnimation(InAnimation, true, AnimationTimeMS, EasingFunction));
        }
Beispiel #2
0
 void AnimationBehavior_RequestOutAnimation()
 {
     if (source != null && source.CompositionTarget != null)
     {
         _story            = AnimationProducer.GetAnimation(OutAnimation, false, AnimationTimeMS, EasingFunction);
         _story.Completed += story_Completed;
         AssociatedObject.BeginStoryboard(_story);
     }
     else // there is no window anymore, so we'll say goodbye silently
     {
         Detach();
     }
 }