Beispiel #1
0
        public ShellViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IUnityContainer container, EsterBootstrapper bootstrapper)
        {
            _eventAggregator = eventAggregator;
            _regionManager = regionManager;
            _bootstrapper = bootstrapper;
            _container = container;
            _regionManager.AddToRegion(RegionNames.MainRegion, container.Resolve<StartView>());

            AppCloseCommand = new DelegateCommand(ApplicationClose);
        }
 public void OnInitialized(IContainerProvider containerProvider)
 {
     _regionManager = containerProvider.Resolve <IRegionManager>();
     _regionManager.AddToRegion(RegionNames.TabBarRegion, new ViewA());
 }
 private void ExecuteMethod(MongoCollection obj)
 {
     _regionManager.AddToRegion(RegionNames.TabControlRegion, _unity.Resolve <T>(new ParameterOverride("collection", obj)));
 }
Beispiel #4
0
 /// <summary>
 /// Registers the view with region.
 /// </summary>
 /// <param name="regionName">Name of the region.</param>
 /// <param name="view">The view.</param>
 public IRegionManagerService AddToRegion(string regionName, object view)
 {
     regionManager.AddToRegion(regionName, view);
     return(this);
 }