Пример #1
0
        public IoWindow(IApp app)
        {
            InitializeComponent();
            DataContext = app;

            Closing += (o, e) =>
            {
                if (app.IsInProgress)
                {
                    app.Cancel();
                    e.Cancel = true;
                }
            };
        }