private void NextButton_OnClick(object sender, RoutedEventArgs e) { if(MainPivot.SelectedIndex<5) MainPivot.SelectedIndex += 1; }