I'm using a WPF NavigationWindow and some Pages and would like to be able to know when the application is closing from a Page.
How can this be done without actively notifying the page from the NavigationWindow_Closing event handler?
I'm aware of the technique here, but unfortunately NavigationService_Navigating isn't called when the application is closed.
One way to do this is have the pages involved support an interface such as:
Implement this interface at the page level:
In the navigation window, check to see if the child is of ICanClose: