I\'m working on an application that displays some child windows which can either be closed by the user or are automatically closed. While debugging some exceptions that wer
You can add a non static property to the WindowClass bool IsClosed, and set true on the Closed event:
public partial class MyWindow : Window
{
public bool IsClosed { get; set; } = false;
public MyWindow()
{
Closed += MyWindow_Closed;
InitializeComponent();
}
}
private void MyWindow_Closed(object sender, EventArgs e)
{
IsClosed = true;
}