Windows crashing the program when attempting to reopen windows after having been closed once already
My MainWindow has some buttons which open other windows also in the project through a
Of the four buttons in this MainWindow two of them are experiencing this crash, while the others aren't for some reason. Please tell me if there's any code you would like to see as I am more than happy to provide it, but there's just so much code that could be relevant to my inexperienced eyes I didn't know what to post.
app.view_name.ShowDialog(); command. If I click the button to open the problem windows and then close it, if I attempt to reopen by clicking the button once again I get this exception:System.InvalidOperationException: 'Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed.'.Of the four buttons in this MainWindow two of them are experiencing this crash, while the others aren't for some reason. Please tell me if there's any code you would like to see as I am more than happy to provide it, but there's just so much code that could be relevant to my inexperienced eyes I didn't know what to post.