示例#1
0
        /// <summary>
        /// Registers the views with regions.
        /// </summary>
        private void RegisterViewsWithRegions()
        {
            DashBoardTabViewModel dmodel = new DashBoardTabViewModel(eventAggregator, moduleManager, regionManager, container);

            this.regionManager.Regions[RegionNames.RibbonRegion].Add(new DashboardTabView(eventAggregator, moduleManager, regionManager, container, dmodel), "dashboardView");
            ContributionAnalyzerTabViewModel cmodel = new ContributionAnalyzerTabViewModel(eventAggregator, moduleManager, regionManager, container);

            this.regionManager.Regions[RegionNames.RibbonRegion].Add(new ContributionAnalyzerTabView(eventAggregator, moduleManager, regionManager, container, cmodel), "contributionAnalyzerView");
            //this.regionManager.RegisterViewWithRegion(RegionNames.RibbonRegion, typeof(DashboardTabView));
            //this.regionManager.RegisterViewWithRegion(RegionNames.RibbonRegion, typeof(ContributionAnalyzerTabView));
            this.regionManager.RegisterViewWithRegion(RegionNames.AppMenuRegion, typeof(SelectView));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ContributionAnalyzerTabView"/> class.
 /// </summary>
 /// <param name="eventAgg">The event agg.</param>
 /// <param name="moduleManager">The module manager.</param>
 /// <param name="regionManager">The region manager.</param>
 /// <param name="unityContainer">The unity container.</param>
 /// <param name="viewModel">The view model.</param>
 public ContributionAnalyzerTabView(IEventAggregator eventAgg, IModuleManager moduleManager, IRegionManager regionManager, IUnityContainer unityContainer, ContributionAnalyzerTabViewModel viewModel)
 {
     this.eventAggregator = eventAgg;
     this.moduleManager   = moduleManager;
     this.regionManager   = regionManager;
     this.unityContainer  = unityContainer;
     InitializeComponent();
     this.DataContext = viewModel;
 }