Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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();
            }
        }