示例#1
0
文件: App.xaml.cs 项目: 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);
        }