private void OnRootWindowDeactivated(DeactivationEventArgs e) { var handler = this.RootWindowDeactivated; if (handler != null) handler(this, e); }
private void OnRootWindowDeactivated(DeactivationEventArgs e) { this.RootWindowDeactivated?.Invoke(this, e); }
private void RootViewModelDeactivated(object sender, DeactivationEventArgs e) { if (this.MinimizeToTray) { // Don't do this if it's shutting down if (this.application.HasMainWindow) this.application.ShutdownMode = ShutdownMode.OnExplicitShutdown; this.applicationWindowState.CloseToTray(); this.viewModel.MainWindowVisible = false; if (this.ShowOnlyOnClose) this.viewModel.Visible = true; } }