I have a small problem, when I open a new window in WPF like so:
private void button2_Click(object sender, RoutedEventArgs e) { var newWindow = new Main(); newWindow.Show(); } If I try to use Application.Current.Shutdown(); at the end of it my entire application shuts down rather than just my first initial window. So my question would be is there a way to open a new window while closing the previous window safely?
Thanks :)
this.Close()?this.Close()if that code is executed on the main form, it might actually close the whole thing.. it's been a while since I touched desktop development.. sorry