//Run OnClosing in IClosing implementing ViewModels
        private void MicroscopeView_Closing(object sender, CancelEventArgs e)
        {
            IClosing context = DataContext as IClosing;

            if (context != null)
            {
                e.Cancel = !context.OnClosing();
            }
        }
Пример #2
0
        void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            IClosing context = DataContext as IClosing;

            context.OnClosing();
        }