Exemplo n.º 1
0
        void Window_Closing(object sender, CancelEventArgs e)
        {
            var controller = (ViewController)ClientState.Current.ViewController;

            if (!controller.CanShutdown())
            {
                if (Inbox2MessageBox.Show(Strings.AreYouSureYouWantToExit, Inbox2MessageBoxButton.YesNo).Result == Inbox2MessageBoxResult.No)
                {
                    e.Cancel = true;

                    return;
                }
            }

            ApplicationHostControl.Shutdown();

            Application.Current.Shutdown();
        }
Exemplo n.º 2
0
        void Window_Initialized(object sender, EventArgs e)
        {
            ApplicationHostControl.Initialize(this);

            WindowChrome.DwmCompositionChanged += delegate { OnPropertyChanged("IsCompositionEnabled"); };
        }