public App()
        {
            var mainWindow = new MainWindow { DataContext = new MainViewModel() };

            Current.MainWindow = mainWindow;
            mainWindow.Show();
        }
Пример #2
0
        public App()
        {
            _mainViewModel = new MainViewModel();
            var mainWindow = new MainWindow { DataContext = _mainViewModel };

            Current.MainWindow = mainWindow;
            mainWindow.Show();
            mainWindow.Closed += MainWindowOnClosed;
        }