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); }
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++; } }
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); }
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++; } }