Exemplo n.º 1
0
        private void MainWindow1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            AppViewModel appViewModel = DataContext as AppViewModel;

            if (appViewModel != null && !appViewModel.CloseApp())
            {
                e.Cancel = true;
            }
        }