I have an WPF application built using VS 2008 .net in VB code with 3.5 framework. I have a number of xaml pages that i have an added button on the page and menubar item that closes the page. When i open and close the page i set a global variable
to indicate if the page is open or closed. So....if i use the added button to close the page the variable is set to closed. However, if i open a page and use the red close button at the top right of the window, the page closes but the global variable does
not get set. Therefore when i try and open that page again, i get a message the page is already open.
So, my question is how do i access the code and set a variable if the red X window close button is used? Also Windows 7 allows the same functionality by clicking on the Icon of the open window in the Task Bar and closing it that way.
Any help will be greatly appreciated.
View Complete Post