private void moveCenterGridUp(object sender, object e) { videoClosed = true; double toX = 0; double toY = -App.Height * yShift; Storyboards.MoveXY(video, AppearTime, 0, 0, toX, toY, hideVideo); Storyboards.MoveXY(centerGrid, AppearTime, 0, 0, toX, toY, null); Storyboards.MoveXY(subscriptionVsOneTimeGrid, AppearTime, 0, 0, toX, toY, null); productsPanel.Visibility = Visibility.Visible; Storyboards.MoveX(productsPanel, App.ProductStackPanelWidth, 0, AppearTime, null); Storyboards.FadeIn(whatsIncludedBtn, AppearTime, null); showAssets(); }
private void combineCenterGrids(object sender, object e) { centerGridAnimating = true; centerGridShowCompare = false; double toX = -App.Width * xShift; double toY = -App.Height * yShift; Storyboards.MoveXY(subscriptionVsOneTimeGrid, CenterGridSplitTime, -toX * xShiftCompareFactor, toY, 0, toY, finishCenterGridAnimation); if (useScalingOnCenterGridAnimation) { Storyboards.MoveXYAndScale(centerGrid, CenterGridSplitTime, toX, toY, 0, toY, CenterGridScaleUp, CenterGridScaleUpTime, null); } else { Storyboards.MoveXY(centerGrid, CenterGridSplitTime, toX, toY, 0, toY, null); } Storyboards.FadeOut(subscriptionVsOneTimeGrid, CenterGridSplitTime, null); }
private void cgReleased(object sender, PointerRoutedEventArgs e) { dbg("Release - enter"); if (dragging) { centerGrid.ReleasePointerCapture(e.Pointer); e.Handled = true; dragging = false; dbg("Release - dragging handled"); } else { dbg("Release - not dragging - return"); return; } if (centerGridAnimating) { dbg("Release - return: move = " + cgMoving + " / animate = " + centerGridAnimating); return; } PointerPoint pp = e.GetCurrentPoint(this); cgTargetRotation = 0; dbg("Release - is move || animate"); if (startX == pp.Position.X && startY == pp.Position.Y) { dbg("Release - toggle and return"); toggleCenterGrid(); return; } CompositeTransform ct = centerGrid.RenderTransform as CompositeTransform; double toX = -App.Width * xShift; double toY = -App.Height * yShift; centerGridAnimating = true; cgMoving = true; dbg("Release - compare = " + centerGridShowCompare); if (centerGridShowCompare) { Storyboards.MoveXY(subscriptionVsOneTimeGrid, CenterGridSplitTime, -toX * xShiftCompareFactor, toY, 0, toY, null); Storyboards.FadeOut(subscriptionVsOneTimeGrid, CenterGridSplitTime, finishCenterGridAnimation); dbg("Release - cgTargetX = " + cgTargetX); /*if (cgTransform != null && Math.Abs(cgTargetX) < 5) { * dbg("Release Point - set TranslateX" + toX); * cgTransform.TranslateX = toX; * cgTransform.TranslateY = toY; * }*/ cgTargetX = 0; cgTargetY = toY; centerGridShowCompare = false; dbg("Release - hide compare"); } else { Storyboards.MoveXY(subscriptionVsOneTimeGrid, CenterGridSplitTime, 0, toY, -toX * xShiftCompareFactor, toY, null); Storyboards.FadeIn(subscriptionVsOneTimeGrid, CenterGridSplitTime, finishCenterGridAnimation); dbg("Release - cgTargetX = " + cgTargetX); /*if (cgTransform != null && Math.Abs(cgTargetX) < 5) { * dbg("Release Point - set TranslateX = 0"); * cgTransform.TranslateX = 0; * cgTransform.TranslateY = toY; * }*/ cgTargetX = toX; cgTargetY = toY; centerGridShowCompare = true; dbg("Release - show compare"); } }