Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var bootstrapper = new Bootstrapper();
            IContainer container = bootstrapper.Bootstrap();

            _mainViewModel = container.Resolve<ApplicationViewModel>();
            MainWindow = new MainWindow(_mainViewModel);
            MainWindow.Show();
            //_mainViewModel.Load();

        }
 public MainWindow(ApplicationViewModel viewModel)
 {
     InitializeComponent();
     _viewModel = viewModel;
     DataContext = _viewModel;
 }