WPF: Cannot reuse window after it has been closed

If I’m not wrong, you can cancel the closing event of that window and instead set visibility to hidden

private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
        e.Cancel = true;
        this.Visibility = Visibility.Hidden;
    } 

Leave a Comment