I have a shell that is a Conductor<Screen>.Collection.OneActive
It has two child screens, a LoginViewModel and a ProjectViewModel. Whenever a user wants to log out, the
ProjectViewModel screen should be closed (if there is a project open) and the
LoginViewModel should be activated.
When the user wants to logout , it is the ProjectViewModel that might need to prevent it and show the user a MessageBox asking whether the project should really be closed. The logic currently is in the
ProjectViewModel.CanClose() override, because only the ProjectViewModel has all the information needed to show the MessageBox.
Only when the ProjectViewModel is
actually closed (i.e. in case there was a MessageBox, the user clicked 'yes'), the user should be logged out and thereafter when I get the notification that the user was
acutally logged out, the LoginViewModel
should be displayed.
The question now is, how can I be notified when the ProjectViewModel was actually closed? How do I know that it was closed because it of a Logout request so the `ShellViewModel` can logout the current user and activate the