Exemple #1
0
        private void beginRemoveAnimation(GraphContentPresenter graphContentPresenter, bool isCenter)
        {
            Debug.Assert(VisualTreeHelper.GetParent(graphContentPresenter) == this);

            this.InvalidateVisual();

            m_fadingGCPList.Add(graphContentPresenter);

            graphContentPresenter.IsHitTestVisible = false;
            if (isCenter)
            {
                graphContentPresenter.WasCenter = true;
            }

            ScaleTransform scaleTransform = graphContentPresenter.ScaleTransform;

            DoubleAnimation doubleAnimation = new DoubleAnimation(0, s_hideDuration);

            doubleAnimation.Completed +=
                delegate(object sender, EventArgs e)
            {
                CleanUpGCP(graphContentPresenter);
            };
            doubleAnimation.FillBehavior = FillBehavior.Stop;
            doubleAnimation.Freeze();

            scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, doubleAnimation);
            scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, doubleAnimation);
            graphContentPresenter.BeginAnimation(OpacityProperty, doubleAnimation);
        }
Exemple #2
0
        private void KillGCP(GraphContentPresenter gcp, bool isCenter)
        {
            Debug.Assert(VisualTreeHelper.GetParent(gcp) == this);

            this.InvalidateVisual();

            _fadingGCPs.Add(_fadingGCPsNextKey, gcp);
            _fadingGCPListValid = false;
            _isChildCountValid  = false;

            int theKey = _fadingGCPsNextKey;

            gcp.IsHitTestVisible = false;
            if (isCenter)
            {
                gcp.WasCenter = true;
            }

            ScaleTransform st = gcp.ScaleTransform;

            DoubleAnimation da = GetNewHideAnimation(gcp, this, theKey);

            st.BeginAnimation(ScaleTransform.ScaleXProperty, da);
            st.BeginAnimation(ScaleTransform.ScaleYProperty, da);
            gcp.BeginAnimation(OpacityProperty, da);


            if (_fadingGCPsNextKey == int.MaxValue)
            {
                _fadingGCPsNextKey = int.MinValue;
            }
            else
            {
                _fadingGCPsNextKey++;
            }
        }
Exemple #3
0
        private void beginRemoveAnimation(GraphContentPresenter graphContentPresenter, bool isCenter)
        {
            Debug.Assert(VisualTreeHelper.GetParent(graphContentPresenter) == this);

            this.InvalidateVisual();

            _fadingGCPList.Add(graphContentPresenter);
            _isChildCountValid = false;

            graphContentPresenter.IsHitTestVisible = false;
            if (isCenter)
            {
                graphContentPresenter.WasCenter = true;
            }

            ScaleTransform scaleTransform = graphContentPresenter.ScaleTransform;

            DoubleAnimation doubleAnimation = new DoubleAnimation(0, s_hideDuration);
            doubleAnimation.Completed +=
                delegate(object sender, EventArgs e)
                {
                    CleanUpGCP(graphContentPresenter);
                };
            doubleAnimation.FillBehavior = FillBehavior.Stop;
            doubleAnimation.Freeze();

            scaleTransform.BeginAnimation(ScaleTransform.ScaleXProperty, doubleAnimation);
            scaleTransform.BeginAnimation(ScaleTransform.ScaleYProperty, doubleAnimation);
            graphContentPresenter.BeginAnimation(OpacityProperty, doubleAnimation);
        }
Exemple #4
0
        private void KillGCP(GraphContentPresenter gcp, bool isCenter)
        {
            Debug.Assert(VisualTreeHelper.GetParent(gcp) == this);

            this.InvalidateVisual();

            _fadingGCPs.Add(_fadingGCPsNextKey, gcp);
            _fadingGCPListValid = false;
            _isChildCountValid = false;

            int theKey = _fadingGCPsNextKey;

            gcp.IsHitTestVisible = false;
            if (isCenter)
            {
                gcp.WasCenter = true;
            }

            ScaleTransform st = gcp.ScaleTransform;

            DoubleAnimation da = GetNewHideAnimation(gcp, this, theKey);
            st.BeginAnimation(ScaleTransform.ScaleXProperty, da);
            st.BeginAnimation(ScaleTransform.ScaleYProperty, da);
            gcp.BeginAnimation(OpacityProperty, da);

            if (_fadingGCPsNextKey == int.MaxValue)
            {
                _fadingGCPsNextKey = int.MinValue;
            }
            else
            {
                _fadingGCPsNextKey++;
            }
        }