protected override void InitializeShell() { base.InitializeShell(); if (this.Shell != null) { Views.PacienteShell pacienteShell = this.Container.GetExportedValue <Views.PacienteShell>(); pacienteShell.Owner = (Window)this.Shell; pacienteShell.ShowActivated = true; pacienteShell.WindowStartupLocation = WindowStartupLocation.CenterOwner; pacienteShell.Closing += PacienteShell_Closing; //Agrega servicio de IRegionManager a shell de paciente RegionManager.SetRegionManager(pacienteShell, this.Container.GetExportedValue <IRegionManager>()); RegionManager.UpdateRegions(); IEventAggregator eventAggregator = this.Container.GetExportedValue <IEventAggregator>(); SwitchShellEvent switchShellEvent = eventAggregator.GetEvent <SwitchShellEvent>(); switchShellEvent.Subscribe(SwitchShell, ThreadOption.UIThread, false, (shell) => !this.isShuttingDown); } else { Application.Current.Shutdown(); } }
public ShellNavigationHelper(IEventAggregator eventAggregator) { this.switchShellEvent = eventAggregator.GetEvent <SwitchShellEvent>(); this.pacienteShellShowingEvent = eventAggregator.GetEvent <PacienteShellShowingEvent>(); }