示例#1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            LogUtil.LogInfo("App", "OnStartup", "Staring up.");
            base.OnStartup(e);
            var window = new Shell();

            // Create the ViewModel to which
            // the main window binds.
            _viewModel = new MainWindowViewModel(MessageServiceFactory.GetMessagingServiceInstance());
            //Set the view models to the windows data context.
            window.DataContext = _viewModel;
            window.Show();

            //Register views for secondary windows.
            ModalViewRegistry.Instance.RegisterView(Constants.HELP_VIEW, typeof(HelpView));
            ModalViewRegistry.Instance.RegisterView(Constants.PICTURE_PICKER_VIEW, typeof(ImagePickerView));
        }