private void PrevButton_OnClick(object sender, RoutedEventArgs e) { if (BlockTransitions) { return; } SlideRight.Begin(); }
protected override void OnManipulationCompleted(ManipulationCompletedEventArgs e) { base.OnManipulationCompleted(e); if (BlockTransitions) { return; } var horizontalVelocity = e.FinalVelocities.LinearVelocity.X; var verticalVelocity = e.FinalVelocities.LinearVelocity.Y; var direction = GetDirection(horizontalVelocity, verticalVelocity); if (direction == Orientation.Horizontal && Math.Abs(horizontalVelocity) > 200) { if (e.TotalManipulation.Translation.X < 0) { if (ShowNextButton) { SlideLeft.Begin(); } else { SlideTopLeft.Begin(); } } else { if (ShowPreviousButton) { SlideRight.Begin(); } else { SlideTopRight.Begin(); } } } }