private void bBarra_MetodosA_Click(object sender, RoutedEventArgs e) { LosingFocus = false; RadResizeAnimation resizeAnimation = new RadResizeAnimation(); EasingFunctionBase ease = new QuadraticEase(); ease.EasingMode = EasingMode.EaseInOut; sz = 220; if (wmetodosa == 0) // Metodos Abierto { resizeAnimation.StartSize = new Size(321, 0); Size size = new Size(321, sz); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = sz; animation.EndPoint = endPoint; animation.Easing = ease; wmetodosa = 1; if (wtecnologiasr == 1 && wmarcon == 1) // Si tecnologias esta abierto sumar a estigma { endPoint.Y = sz + 290 + 140; animation.EndPoint = endPoint; pA(animation, 3); } else { if (wtecnologiasr == 1) { endPoint.Y = 290 + sz; animation.EndPoint = endPoint; pA(animation, 3); } else { if (wmarcon == 1) { endPoint.Y = 140 + sz; animation.EndPoint = endPoint; pA(animation, 3); } else { endPoint.Y = sz; animation.EndPoint = endPoint; pA(animation, 3); } } } } else // Metodos Cerrado { resizeAnimation.StartSize = new Size(321, sz); Size size = new Size(321, 0); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = 0; animation.EndPoint = endPoint; animation.Easing = ease; wmetodosa = 0; if (wtecnologiasr == 1 && wmarcon == 1) { endPoint.Y = (290 + 140); animation.EndPoint = endPoint; pA(animation, 3); } else { if (wtecnologiasr == 1) { endPoint.Y = 290; animation.EndPoint = endPoint; pA(animation, 3); } else { if (wmarcon == 1) { endPoint.Y = 140; animation.EndPoint = endPoint; pA(animation, 3); } else { endPoint.Y = 0; animation.EndPoint = endPoint; pA(animation, 3); } } } } RadAnimationManager.Play(grid_MetodosA, resizeAnimation); }
private void bBarra_Estigma_Click(object sender, RoutedEventArgs e) { LosingFocus = false; RadResizeAnimation resizeAnimation = new RadResizeAnimation(); EasingFunctionBase ease = new QuadraticEase(); ease.EasingMode = EasingMode.EaseInOut; sz = 180; if (westigma == 0) { resizeAnimation.StartSize = new Size(321, 0); Size size = new Size(321, sz); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = sz; animation.EndPoint = endPoint; animation.Easing = ease; westigma = 1; } else { resizeAnimation.StartSize = new Size(321, sz); Size size = new Size(321, 0); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = 0; animation.EndPoint = endPoint; animation.Easing = ease; westigma = 0; } RadAnimationManager.Play(grid_Estigma, resizeAnimation); }
private void bBarra_TecnologiasR_Click(object sender, RoutedEventArgs e) { LosingFocus = false; RadResizeAnimation resizeAnimation = new RadResizeAnimation(); EasingFunctionBase ease = new QuadraticEase(); ease.EasingMode = EasingMode.EaseInOut; RadMoveAnimation animation2 = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint2 = new Point(); endPoint2.X = 0; endPoint2.Y = 2 * sz; animation2.EndPoint = endPoint2; animation2.Easing = ease; RadMoveAnimation animation3 = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint3 = new Point(); endPoint3.X = 0; endPoint3.Y = 3 * sz; animation3.EndPoint = endPoint3; animation3.Easing = ease; sz = 290; if (wtecnologiasr == 0) //tecnologias Cerrado { resizeAnimation.StartSize = new Size(321, 0); Size size = new Size(321, sz); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = sz; animation.EndPoint = endPoint; animation.Easing = ease; wtecnologiasr = 1; if (wmarcon == 1 && wmetodosa == 1) { endPoint2.Y = 140 + sz; animation2.EndPoint = endPoint2; pA(animation2, 2); endPoint.Y = 140 + 220 + sz; animation.EndPoint = endPoint; pA(animation, 3); } else { if (wmetodosa == 1) { endPoint.Y = sz; animation.EndPoint = endPoint; pA(animation, 2); endPoint2.Y = 220 + sz; animation2.EndPoint = endPoint2; pA(animation2, 3); } else { if (wmarcon == 1) { endPoint.Y = sz + 140; animation.EndPoint = endPoint; pA(animation, 2); endPoint2.Y = sz + 140; animation2.EndPoint = endPoint2; pA(animation2, 3); } else { endPoint.Y = sz; animation.EndPoint = endPoint; pA(animation, 2); pA(animation, 3); } } } } else //TecnologiasR Abierto. { resizeAnimation.StartSize = new Size(321, sz); Size size = new Size(321, 0); resizeAnimation.EndSize = size; resizeAnimation.Easing = ease; RadMoveAnimation animation = new RadMoveAnimation(); ease.EasingMode = EasingMode.EaseInOut; Point endPoint = new Point(); endPoint.X = 0; endPoint.Y = 0; animation.EndPoint = endPoint; animation.Easing = ease; wtecnologiasr = 0; if (wmarcon == 1 && wmetodosa == 1) { endPoint2.Y = 140; animation2.EndPoint = endPoint2; pA(animation2, 2); endPoint.Y = 220 + 140; animation.EndPoint = endPoint; pA(animation, 3); } else { if (wmetodosa == 1) { endPoint.Y = 0 * sz; animation.EndPoint = endPoint; pA(animation, 2); endPoint2.Y = 220; animation2.EndPoint = endPoint2; pA(animation2, 3); } else { if (wmarcon == 1) { endPoint.Y = 140; animation.EndPoint = endPoint; pA(animation, 2); endPoint2.Y = 140; animation2.EndPoint = endPoint2; pA(animation2, 3); } else { endPoint.Y = 0; animation.EndPoint = endPoint; pA(animation, 2); pA(animation, 3); } } } } RadAnimationManager.Play(grid_TecnologiasR, resizeAnimation); }