Example #1
0
File: App.xaml.cs Project: Gope/M3
        public App()
        {
            // Push the knowledge about connecting and instantiating view and viewmodel to a 3rd party/component.
            IEventAggregator eventAggregator = new EventAggregator(Current.Dispatcher);
            IPresentationManager manager = new PresentationManager();
            manager.Register<DialogView, DialogViewModel>();
            manager.Register<MainView, MainViewModel>();

            var mainViewModel = new MainViewModel(manager, eventAggregator);
            manager.ShowViewFor(mainViewModel);
        }