//Onclick method for the XML uploading button private void XmlButton_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { try { _generalVM.LoadXMLFile(openFileDialog.FileName); } catch (Exception) { XmlPathBox.Text = "Invalid XML file"; return; } XmlPathBox.Text = openFileDialog.FileName; _xmlUploded = true; step2box.Background = Brushes.Green; enableContinueButton(); } }