public void Push(Type viewModelType, Dictionary <string, object> data = null) { ShellViewModel viewModel = Container.GetInstance <IViewModelFactory>().GetViewModel(viewModelType, data) as ShellViewModel; Shells.Add(viewModel); ActiveShell = viewModel; ActiveShell.OnActivated(); }
public void Pop() { if (!Shells.Any()) { return; } Shells.Remove(Shells.Last()); if (!Shells.Any()) { return; } ActiveShell = Shells.Last(); ActiveShell.OnActivated(); if (ActiveShell.ActiveItem != null) { ActiveShell.ActiveItem.OnActivated(); } }