I am working on WPF. When the application starts, Mainwindow opens. There are two buttons in this window. Each opens a new window. For example, there are add and update buttons. The "Add" button opens the "Add Element" window when a click event is called and, by a similar update, opens the "Update Element" window. If I close Mainwindow, the two Add-Item and Update-Item windows remain open. I want that if I close Mainwindow, these two other windows should also be closed.
app.current.shutdown
app.current.shutdown is mainly used. My question is: where should I publish this line of code in my program, in mainwindow or in App.config. Should I call any event or function in this answer too?
source share