コード例 #1
0
 private void OnRootWindowDeactivated(DeactivationEventArgs e)
 {
     var handler = this.RootWindowDeactivated;
     if (handler != null)
         handler(this, e);
 }
コード例 #2
0
 private void OnRootWindowDeactivated(DeactivationEventArgs e)
 {
     this.RootWindowDeactivated?.Invoke(this, e);
 }
コード例 #3
0
        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;
            }
        }