ClosingScreen.xaml の相互作用ロジック
Inheritance: System.Windows.Window
示例#1
0
        private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            // CancelをTrueにするとクローズキャンセル
            e.Cancel = (!_model.TryClose());

            if (e.Cancel != true)
            {
                ClosingScreen closing = new ClosingScreen();
                closing.Owner  = this;
                closing.Width  = this.ActualWidth;
                closing.Height = this.ActualHeight;
                closing.Show();

                SaveState();

                Thread.Sleep(1000);
                closing.Close();
            }
        }
        private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            // CancelをTrueにするとクローズキャンセル
            e.Cancel = (!_model.TryClose());

            if (e.Cancel != true)
            {
                ClosingScreen closing = new ClosingScreen();
                closing.Owner = this;
                closing.Width = this.ActualWidth;
                closing.Height = this.ActualHeight;
                closing.Show();

                SaveState();

                Thread.Sleep(1000);
                closing.Close();
            }
        }