I am working on WPF. There is Mainwindow which opens as application starts. There are two buttons within this window. Each open a new window. e.g There are Add and update buttons. Add button opens a Add-Item window on its click event call and similarly update opens it's window "Update-Item". If i close Mainwindow these two windows "Add-Item" and "Update-Item" remains open. I want that if i close Mainwindow, these other two windows should also close with it.I am working on WPF. There is Mainwindow which