Use the Closing
event in the Window, you can handle it like this to prevent it from closing:
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
}
Use the Closing
event in the Window, you can handle it like this to prevent it from closing:
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
}