Exemplo n.º 1
0
 public void RegisterView <TPageConcrete>(string pageID, IViewmodel viewmodel)
 {
     if (!this.viewmodelDictionary.ContainsKey(pageID))
     {
         this.viewmodelDictionary.Add(pageID, viewmodel);
     }
 }
Exemplo n.º 2
0
        private void Navigate(IViewmodel view)
        {
            // Tell the current view that we're navigating away from it
            this.CurrentViewmodel.OnNavigatedFrom();

            this.CurrentViewmodel = view;

            // Tell the new view we've just navigated to it
            this.CurrentViewmodel.OnNavigatedTo();
        }
Exemplo n.º 3
0
        public IViewmodel GetInstance()
        {
            if (this.MaintainInstance && this.viewmodelInstance != null)
            {
                return(this.viewmodelInstance);
            }

            this.viewmodelInstance = Activator.CreateInstance(this.ConcretePageType, this.bootstrapperController, this.view) as IViewmodel;

            return(this.viewmodelInstance);
        }
Exemplo n.º 4
0
 public void RegisterView <TPageConcrete>(IViewmodel viewmodel)
 {
     this.RegisterView <TPageConcrete>(typeof(TPageConcrete).Name, viewmodel);
 }