public void RegisterView <TPageConcrete>(string pageID, IViewmodel viewmodel) { if (!this.viewmodelDictionary.ContainsKey(pageID)) { this.viewmodelDictionary.Add(pageID, viewmodel); } }
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(); }
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); }
public void RegisterView <TPageConcrete>(IViewmodel viewmodel) { this.RegisterView <TPageConcrete>(typeof(TPageConcrete).Name, viewmodel); }