I have a WPF window with several text box controls using bindings. When I make a change to a text box control and click on the red Close button on the title bar of the window, my bindings are not updated.
I know this because I have an override for the OnClosing method. I check to see if any property has changed and give the user an option to save changes before the window is closed. When this button is clicked, even if I just made a change to a text box, the bound property does not register that it has been changed.
So how do I make sure all "bound" values are updated when I click on the red Close button?