In the attached WPF application, a double deactivation is obtained for the active tab screen when the application is closed.
Reproduce as follows:
Open, build and run solution. A window will open.
Press button and OK to activation dialog, and three tabs will be created.
Without doing anything else, close application using the window close icon.
You will receive two sequential deactivation dialogs.
Zip includes Caliburn.Micro code. Open Screen.cs
Uncomment code as shown below, and when run again only one devactivation will be obtained.
void IDeactivate.Deactivate(bool close)
if (!IsActive && !IsInitialized)
//JSRSOFT uncomment to prevent double deactivations