I have the following code:
----------------------------------------
Window1 test = new Window1();
private void button1_click(object sender, RoutedEventArgs e)
{
test.Owner = this;
test.ShowDialog();
}
---------------------------------
If using Windows forms: On the Widows1 form I have a button with the property set as CancelButton. When I cancel it I can re-open it with the button click event on the main form without a problem.
When I try the same thing in WPF with the button on Windows1 property set to IsCancel, I get an Exception error: Cannot set visibility or call show [...] after a window has closed.
Any solutions to this?