//when continue clicked, checks if values are null //If not, call main pages continue event handler private void continue_Click(object sender, RoutedEventArgs e) { if (cbGender.SelectedItem != null && cbAge.SelectedItem != null) { mainPage.continue_Click(sender, e); } else { validationDialog("You have not entered valid details, please fill out the form before continuing"); } }