Example #1
0
        private void OnHideAnimationCompleted(ElementAnimator sender, UIElement element)
        {
            if (CachedVisualTreeHelpers.GetParent(element) == (DependencyObject)(m_owner))
            {
                m_owner.ViewManager.ClearElementToElementFactory(element);

                // Invalidate arrange so that repeater can arrange this element off-screen.
                m_owner.InvalidateArrange();
            }
        }
Example #2
0
        public void OnAnimatorChanged(ElementAnimator newAnimator)
        {
            // While an element is hiding, we have ownership of it. We need
            // to know when its animation completes so that we give it back
            // to the view generator.
            if (m_animator != null)
            {
                m_animator.HideAnimationCompleted -= OnHideAnimationCompleted;
            }

            m_animator = newAnimator;

            if (newAnimator != null)
            {
                newAnimator.HideAnimationCompleted += OnHideAnimationCompleted;
            }
        }