/// <summary> /// Is called when the next button is pressed. Moves the current page to the right and moves the next page to it's default position, if certain conditions are met. /// </summary> private async void NextButton_Click(object sender, RoutedEventArgs e) { bool move = false; if (pageIndex == 0) { if ((bool)AgreeCheckbox.IsChecked) { //This sends a one time request to clemenskoprolin.com. More information can be found in the class TelemetryService. _ = TelemetryService.SendFirstStartTelemetry(); move = true; } else { ShowCheckboxRequired(); } } if (pageIndex == 1) { if (((bool)DisableTelemetryButton.IsChecked || (bool)EnableTelemetryButton.IsChecked)) { move = true; } else { ShowTelemetryOptionRequired(); } } if (move) { DeactivatePreviousNextButton(); float xTo = -(float)((Frame)Window.Current.Content).ActualWidth; _ = MovePageTo(pages[pageIndex], new Vector3(xTo, 0, 0)); if (pageIndex + 1 != pages.Count) { pageIndex++; float xFrom = (float)((Frame)Window.Current.Content).ActualWidth; _ = MovePageFrom(pages[pageIndex], new Vector3(xFrom, 0, 0)); ActivatePreviousNextButton(); } else { await Task.Delay((int)pages[pageIndex].TranslationTransition.Duration.TotalMilliseconds); NavigateToMainShell(); } } }